[Bug c++/81586] valgrind error in output_buffer_append_r with -Wall

dcb314 at hotmail dot com gcc-bugzilla@gcc.gnu.org
Thu Jul 27 17:04:00 GMT 2017


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81586

--- Comment #1 from David Binderman <dcb314 at hotmail dot com> ---
The following much reduced C++ code seems to demonstrate the bug:

extern "C" int snprintf(char *, unsigned long, const char *...) ;
struct  S {
        char * a;
};
void f( S * af)
{
        snprintf(af->a, sizeof(af), "af_get_next_segv end of file reading
segmen
t tail AFF file is truncated 0");
}


More information about the Gcc-bugs mailing list