diff options
author | Fabian Greffrath | 2015-03-27 16:26:22 +0100 |
---|---|---|
committer | Fabian Greffrath | 2015-03-27 16:30:46 +0100 |
commit | d03ee98d63748ba0e2225be221b45a250c8c5741 (patch) | |
tree | 80cf7cfb777c0b8f5776a2fa3fd025a9380d17cb /opl/examples/droplay.c | |
parent | b34294b67473e8d3ad4b8204327e03d91bcd6214 (diff) | |
download | chocolate-doom-d03ee98d63748ba0e2225be221b45a250c8c5741.tar.gz chocolate-doom-d03ee98d63748ba0e2225be221b45a250c8c5741.tar.bz2 chocolate-doom-d03ee98d63748ba0e2225be221b45a250c8c5741.zip |
Avoid calling strlen() on a potentially unterminated string
The src string may be unterminated and the call to strncpy() be
terminated by reaching dest_size. Instead of calling strlen() on the
src string, check if it has a NUL byte at the same position as the
dest string -- if not, the string was truncated.
Valgrind now gives thumbs up!
Diffstat (limited to 'opl/examples/droplay.c')
0 files changed, 0 insertions, 0 deletions