[galib] buffer overflow with long score file filenames

Michael Gratton mike at vee.net
Sun Apr 6 06:14:07 EDT 2008


Using long paths (>64 bytes) for the score file name causes a buffer
overflow in galib247.

The attached patch fixes this. It just removes the string copy in
GAGeneticAlgorithm::setptr() before calling
GAStatistics::scoreFilename(), because that method makes a copy anyway.


✌ Michael Gratton. Geeknik since 1976.
✇ <http://web.vee.net/>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gaNscoreFilename-length.patch
Type: text/x-patch
Size: 536 bytes
Desc: not available
Url : http://mailman.mit.edu/pipermail/galib/attachments/20080406/c69b2022/attachment.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://mailman.mit.edu/pipermail/galib/attachments/20080406/c69b2022/attachment-0001.bin

More information about the galib mailing list