Menu

#8 buffer check in cddb_write_data

Unstable (example)
open
nobody
None
5
2021-05-13
2021-05-13
No

While debugging my patch to Asunder I had to compile libcddb and check what happens in cddb_write(). I saw the macro CDDB_WRITE_APPEND and its missing check of the return value of snprintf. I've changed the macro such that it performs the check and returns -1, when 'buf' is too small. At the same time I could get rid of the first parameter so its usage is now much easier.

The patch file is attached.

1 Attachments

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.