Package: liblircclient0 Version: 0.7.1pre2-10 Severity: normal Tags: Patch Trying to track down a different error, valgrind pointed out that the realloc call in lirc_nextcode is off by one, as it fails to include the extra byte that was originally malloc'd to hold the NULL terminating the string.
This patch fixes it. --- tools/lirc_client.c.org 2005-10-13 16:10:17.000000000 +1000 +++ tools/lirc_client.c 2005-10-13 15:53:14.000000000 +1000 @@ -1483,7 +1483,7 @@ int lirc_nextcode(char **code) char *new_buffer; packet_size+=PACKET_SIZE; - new_buffer=(char *) realloc(lirc_buffer,packet_size); + new_buffer=(char *) realloc(lirc_buffer,packet_size+1); if(new_buffer==NULL) { return(-1); -- System Information: Debian Release: testing/unstable APT prefers unstable APT policy: (990, 'unstable'), (950, 'unstable'), (900, 'experimental') Architecture: i386 (i686) Shell: /bin/sh linked to /bin/bash Kernel: Linux 2.6.12 Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8) -- Paul "TBBle" Hampson, [EMAIL PROTECTED] 8th year CompSci/Asian Studies student, ANU Shorter .sig for a more eco-friendly paperless office.
pgpAAlFfyxpcl.pgp
Description: PGP signature