eggdrop icon indicating copy to clipboard operation
eggdrop copied to clipboard

Crash fix add_note() - Followup to #1763

Open michaelortmann opened this issue 1 year ago • 0 comments

Found by: michaelortmann Patch by: michaelortmann Fixes:

One-line summary: Fix add_note()

Additional description (if needed): In addition to finding the bug in February 2025, and fixing it, i have now also been able to automatically find it with https://github.com/AFLplusplus/AFLplusplus

Test cases demonstrating functionality (if applicable):

CFLAGS="-fsanitize=address" ./configure

Before:

.note CpgevlUVBdudySxBQErFYkoOBSabbVjuiLvuPkpvFjSZpWvcoomkbSoqPDLKwckeatNBMXuhjyJwwktER: a
[14:37:05] tcl: builtin dcc call: *dcc:note -HQ 1 CpgevlUVBdudySxBQErFYkoOBSabbVjuiLvuPkpvFjSZpWvcoomkbSoqPDLKwckeatNBMXuhjyJwwktER: a
=================================================================
==197765==ERROR: AddressSanitizer

After:

.note CpgevlUVBdudySxBQErFYkoOBSabbVjuiLvuPkpvFjSZpWvcoomkbSoqPDLKwckeatNBMXuhjyJwwktER: a
[06:02:24] tcl: builtin dcc call: *dcc:note -HQ 1 CpgevlUVBdudySxBQErFYkoOBSabbVjuiLvuPkpvFjSZpWvcoomkbSoqPDLKwckeatNBMXuhjyJwwktER: a
[06:02:24] add_note(): sock not a number
.note 424242424242424242424242424242424242424242424242424242424242424242424242424242424: a
[06:02:28] tcl: builtin dcc call: *dcc:note -HQ 1 424242424242424242424242424242424242424242424242424242424242424242424242424242424: a
[06:02:28] add_note(): sock out of range
.note 42: a
[06:02:35] tcl: builtin dcc call: *dcc:note -HQ 1 42: a
I don't know anyone by that name.

michaelortmann avatar Feb 01 '25 14:02 michaelortmann