Forums » Developer discussions »
Fix flood of "buffer too small" errors/warnings
Added by swsnyder over 5 years ago
This patch fixes the problem of an endless series of error boxes complaining of "buffer too small". Eventually my (Fedora 14 / x86_64) desktop locks up due to the resources consumed by the hundreds of message boxes.
Fix #1: Increase the size of the buffer used to hold the date/time string. (32 - 1) bytes is in fact too damned small for the string it is supposed to hold.
Fix #2: Don't pound the user with complaints. If the static buffer was too small on the first try it will be too small on every try. Issue a single warning/error to remind the user that he is using beta software, then complain no more.
Patched against Fedora's nntpgrab-0.6.91-2.fc14.src.rpm source RPM.
nntpgrab-single-error.patch - Increase size of date/time static buffer; warn/error only once (2.3 KB)
Replies
RE: Fix flood of "buffer too small" errors/warnings - Added by swsnyder over 5 years ago
I should note that it was the bugs in nntpgrab-0.6.91/client/gui_qt/DownloadQueueItem.cpp that caused my problem.
I fixed nntpgrab-0.6.91/base/utils.c because it had the potential for the same endless sequence of errors.
RE: Fix flood of "buffer too small" errors/warnings - Added by Alguno over 5 years ago
Thanks for your patch!
It has just been applied in r1805.
Next time please use the bug tracker to publish any patches to avoid them getting lost
NNTPGrab

