gnokii-users
[Top][All Lists]
Advanced

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

Re: another error when gnokii --getsms


From: Pawel Kot
Subject: Re: another error when gnokii --getsms
Date: Sat, 15 Aug 2009 14:57:46 +0200

Hi,

On Sat, Aug 15, 2009 at 13:59, Daniele Forsi<address@hidden> wrote:
> pre increment doesn't seem right to me because the while loop will
> have skipped all extended TP-PI (if any) and pdu[offset] will be the
> octet to consider:

Right. I did this when I commented out while loop. With the loop that
should be pdu[offset++]. I'll commit fixed version.

> also in COPY_USER_DATA() from older code there is a check against
> "1000" that I don't understand, it's probably to avoid a buffer
> overflow in the following memcpy(rawsms->user_data, pdu + offset,
> pdu_len - offset);

Yeah. I was wondering where this 1000 came from. I think it is a magic
"just enough" value. I'll change it for GN_SMS_USER_DATA_MAX_LENGTH.
In fact it is what it should be. This constant is set to 512 (cannot
say why at the moment) but is not used anywhere. I'll change it for
256.

take care,
-- 
Pawel Kot




reply via email to

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