Hi Nigel, * Nigel Horne <[EMAIL PROTECTED]> [2007-12-29 17:11]: > >buf[nbytes-1] = '\0'; should do the trick. > > Wrong, that will now add the nul byte one byte too early. > > There is a low-priority bug around here, fixed by changing > nbytes = clamd_recv(sock, buf, sizeof(buf); > to > nbytes = clamd_recv(sock, buf, sizeof(buf) - 1);
Ups you are right :) Anyway its still off-by-one :) > There is no real-world issue here though, so no need to panic. "This does not have any security impact except if this will ping a crafted clamd :)" Any possibility to misunderstand that? I don't think so. Cheers Nico -- Nico Golde - http://www.ngolde.de - [EMAIL PROTECTED] - GPG: 0x73647CFF For security reasons, all text in this mail is double-rot13 encrypted.
pgpwbrHHeBhnC.pgp
Description: PGP signature