]> granicus.if.org Git - php/commit
Fix crash on very long error messages
authorStanislav Malyshev <stas@php.net>
Fri, 8 Sep 2000 12:32:29 +0000 (12:32 +0000)
committerStanislav Malyshev <stas@php.net>
Fri, 8 Sep 2000 12:32:29 +0000 (12:32 +0000)
commit6426d1c9ce06969fd18e81949e18ee76fa27da1c
tree5e4483b2b3e9b26e4ce0ec48fbd493ebbe7adc74
parent24b2feff633ef653781cc0e8231e1be3fe917c8b
Fix crash on very long error messages
Manual for snprintf says:
       If  the output was truncated, the return value is -1, oth-
       erwise it is the number of characters stored, not  includ-
       ing the terminating null.
And that's a blatant lie - in reality, libc 2.1 always returns number of
characters that _would be_ stored. I hate those libc bugs. Now we should go
and check every place we trusted snprintf return value.
main/main.c