[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 2/2] fix rep_line memory leaks in module.c
From: |
Christopher Brannon |
Subject: |
[PATCH 2/2] fix rep_line memory leaks in module.c |
Date: |
Thu, 30 Sep 2010 13:02:02 -0500 |
Andrei Kholodnyi <andrei.kholodnyi at gmail.com> writes:
> - n used now instead of strlen
> - if (strlen(rep_line) <= 4){
> + if (n <= 4){
Hi Andrei,
Sorry for the extra noise.
This is incorrect.
n is the size of the buffer. You should use ret instead, since it
contains the number of characters read (or -1 on EOF / error).
-- Chris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL:
<http://lists.freebsoft.org/pipermail/speechd/attachments/20100930/40f7d91e/attachment.pgp>