temporary_cstring_as_ptr doesn't catch UAF when Result is assigned to a variable #4375
Labels
C-bug
Category: Clippy is not doing the correct thing
C-enhancement
Category: Enhancement of lints, like adding more cases or adding help messages
Source:
clippy doesn't complain about this, even though it's equally dangerous to
foo(CString::new(v).unwrap().as_ptr())
. It should complain about this formulation as well.Tested with clippy on play.rust-lang.org:
0.0.212 (2019-08-11 72da101)
The text was updated successfully, but these errors were encountered: