Re: gwlib/http.c patch

"Nikos Balkanas" <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Message-ID <000301c9af1c$8f106050$02b2a8c0@tardis>
Hi,

The mistake here is that this is done with memcpy, which will copy all bits 
without checking. It is not writing, therefore no memory corruption, as I 
stated, but the copied data in Octstr is invalid and has the wrong length. 
Not a biggie if you are using it as a C string, but quite messy if you use 
it as Octstr.

BR,
Nikos
----- Original Message ----- 
From: "Vincent CHAVANIS" <[email protected]>
To: "Nikos Balkanas" <[email protected]>
Cc: <[email protected]>
Sent: Friday, March 27, 2009 10:05 PM
Subject: Re: gwlib/http.c patch


> Hi nikos,
>
> I could not understand this patch !?
> If `from+len' is after the end of `ostr', `len' is reduced appropriately.
> So what's wrong here ?
>
> Vincent.
>
>
>
> Nikos Balkanas a Γ©crit :
>> Hi,
>>  A small patch that left as it is should lead to memory corruption. I 
>> have not tested the broken code but it seems quite obvious to me. Please 
>> vote & decide.
>>  BR,
>> Nikos
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.