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);


Kind regards
Nico

There is no real-world issue here though, so no need to panic.

-Nigel
begin:vcard
fn:Nigel Horne
n:Horne;Nigel
org:NJH Music
adr:Pogmoor;;28 Wharfedale Road;Barnsley;South Yorkshire;S75 2LJ;UK
email;internet:[EMAIL PROTECTED]
tel;fax:+44 870 705 9334
note:Skype: nigelhorne
x-mozilla-html:FALSE
url:http://www.bandsman.co.uk
version:2.1
end:vcard

Reply via email to