hobbitfetch core dump fix

Cade Robinson cade.robinson at gmail.com
Fri Feb 5 15:24:20 CET 2010


I was having issues with hobbitfetch core dumping.
I finally figured out the issue.

In the "grabdata" function there is:
int n;
char buf[8192];

/* Read data from a peer connection (client or server) */
n = read(conn->sockfd, buf, sizeof(buf));
...
else if (n > 0) {
...
buf[n] = '\0';
...

If 8192 bytes are read then "n" is 8192.  There is no element 8192 in
buf.  buf is 0-8191.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20100205/d5437516/attachment.html>


More information about the Xymon mailing list