speechd-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 2/2] fix rep_line memory leaks in module.c


From: Andrei Kholodnyi
Subject: [PATCH 2/2] fix rep_line memory leaks in module.c
Date: Thu, 30 Sep 2010 20:31:16 +0200

On Thu, Sep 30, 2010 at 8:02 PM, Christopher Brannon
<cmbrannon79 at gmail.com> wrote:
> 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).

Thanks Chris,
I missed that n is a buffer size, then this comparison makes no sense
+               if (n < 1024)
+                   n = 1024;

Could you do these changes yourself or I should resubmit this patch ?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]