diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2013-11-02 10:23:55 -0700 |
---|---|---|
committer | Akira TAGOH <akira@tagoh.org> | 2013-11-05 11:42:59 +0900 |
commit | cb72901d0b7dff73ea2596491c5db602e4750853 (patch) | |
tree | 48c3c6701ab41f29cf5f01a6ee7f5179ed26c674 /fc-lang/nds.orth | |
parent | 767108aa1327cf0156dfc6f024dbc8fb783ae067 (diff) |
Leave room for null terminators in arrays
Code currently returns a fatal error if it tries to add more entries
than the array has room for, but it wasn't checking to make sure
the final null terminator entry would fit.
Reported by parfait 1.3:
Error: Buffer overrun
Buffer overflow (CWE 120): In array dereference of files[i] with index i
Array size is 256 elements (of 4 bytes each), index >= 0 and index <= 256
at line 250 of fc-glyphname/fc-glyphname.c in function 'main'.
Error: Buffer overrun
Buffer overflow (CWE 120): In array dereference of entries[i] with index i
Array size is 1024 elements (of 8 bytes each), index >= 0 and index <= 1024
at line 298 of fc-lang/fc-lang.c in function 'main'.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'fc-lang/nds.orth')
0 files changed, 0 insertions, 0 deletions