#73 found an overlapping data buffer in plcore.c at line 967

closed-fixed
nobody
None
5
2009-12-09
2009-12-08
orbitcowboy
No

during a check with the static code analysis tool cppcheck
(https://sourceforge.net/projects/cppcheck/) the tool discovered
an overlapping data buffer in plcore.c at line 967

cppcheck printed:

[plcore.c:967]: (Error) Overlapping data buffer buf

Take a look at the code:

snprintf( buf, BUFFER_SIZE, "UTF-8 string is malformed: %s%s",
buf, strlen( string ) > 30 ? "[...]" : "" );

Indeed the buffer 'buf' overlapps.

Best regards

Ettl Martin

Discussion

  • Andrew Ross

    Andrew Ross - 2009-12-09

    Thanks. Patch applied.

     
  • Andrew Ross

    Andrew Ross - 2009-12-09
    • status: open --> closed-fixed
     

Log in to post a comment.