[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] pbuf PBUF_POOL alignment [PATCH]
From: |
Pedro Alves |
Subject: |
Re: [lwip-users] pbuf PBUF_POOL alignment [PATCH] |
Date: |
Mon, 17 Apr 2006 13:12:03 +0100 |
User-agent: |
Mozilla Thunderbird 1.0.2 (Windows/20050317) |
I noticed that perhaps I didn't explain the problem fully
This patch fixes alignment problems of pbuf of PBUF_POOL type.
p->len = 200 > 128 - 12 ? 128 - 12 : 200 -> 128-12 -> 116 !!!
Here the problem isn't that 116 is not aligned of course,
it is that p->payload + p->len is a buffer overflow by two bytes.
Memory corruction goes hand in hand with buffer overflows.
Cheers,
Pedro Alves