NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
toolchain/50758: [src/tools/compat/snprintf.c:192]: (error) Array 'rep[9]' accessed at index 10, which is out of bounds.
>Number: 50758
>Category: toolchain
>Synopsis: [src/tools/compat/snprintf.c:192]: (error) Array 'rep[9]' accessed at index 10, which is out of bounds.
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: toolchain-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Feb 03 10:15:00 +0000 2016
>Originator: David Binderman
>Release: cvs dated 20160203
>Organization:
>Environment:
>Description:
Source code is
(*state->append_char)(state, rep[10] + 23); /* XXX */
but function append_number is sometimes called with rep for octal only.
len += append_number (state, arg, 010, "01234567",
width, prec, flags, 0);
Octal numbers are pretty rare these days.
I think this would be another bug caught by -D_FORTIFY_SOURCE=2.
>How-To-Repeat:
>Fix:
Home |
Main Index |
Thread Index |
Old Index