[vlc-devel] [PATCH] Enforce null pointer replacement on msg_Foo debug strings
Francois Cartegnie
fcvlcdev at free.fr
Thu May 20 22:43:00 CEST 2010
Le jeudi 20 mai 2010, vous avez écrit :
> Second, it is totally blind. In some cases the string cannot be NULL. And
Of course, as I mentioned all replacements are not required:
find . -name "*.c*" -exec grep -E "msg_(Dbg|Err|Warn)" {} \; | wc -l
6603
gives you an idea why I didn't spent my time backtracking every string
variable used in debug strings. Restricting analysis to the editor's viewport
already took too much time.
> There may be simpler implementations of sprintf than glibc, e.g. gnulib or
> mingw. Another option is to map page 0 and write "(null)\0" as the firt 7
> bytes.
Yes, if you have a particular library code in mind(*), please patch the same
way you already did for vasprintf.
* note it needs the special '%m' format in some places
Francois
More information about the vlc-devel
mailing list