http://bugs.winehq.org/show_bug.cgi?id=18045
Summary: Dangerous usage of strncat Product: Wine Version: 1.1.19 Platform: Other URL: http://cppcheck.wiki.sourceforge.net/ OS/Version: other Status: UNCONFIRMED Severity: minor Priority: P2 Component: -unknown AssignedTo: wine-bugs@winehq.org ReportedBy: begert@gmail.com CC: begert@gmail.com
Running cppcheck 1.31 against wine 1.1.19 yeilds:
[./dlls/mciavi32/info.c:257]: (all) Dangerous usage of strncat, possible buffer overrun
Currently the code looks like:
strncat(buffer, " seek_exactly", sizeof(buffer));
Looking at the strncat man page, perhaps better usage would be:
strncat(buffer, " seek_exactly", sizeof(buffer) - strlen(buffer) - 1);