Re: [PATCH] connection: Don't add uninitialized memory as 4 byte alignment padding

2016-02-12 Thread Jonas Ådahl
On Thu, Feb 11, 2016 at 11:34:15AM +0200, Pekka Paalanen wrote: > On Thu, 11 Feb 2016 09:47:29 +0800 > Jonas Ådahl wrote: > > > On Wed, Feb 10, 2016 at 12:37:43PM -0600, Derek Foreman wrote: > > > On 10/02/16 09:35 AM, Jonas Ådahl wrote: > > > > When we are adding padding

Re: [PATCH] connection: Don't add uninitialized memory as 4 byte alignment padding

2016-02-11 Thread Pekka Paalanen
On Thu, 11 Feb 2016 09:47:29 +0800 Jonas Ådahl wrote: > On Wed, Feb 10, 2016 at 12:37:43PM -0600, Derek Foreman wrote: > > On 10/02/16 09:35 AM, Jonas Ådahl wrote: > > > When we are adding padding bytes making our wl_buffer buffer content 4 > > > byte aligned, we are just

Re: [PATCH] connection: Don't add uninitialized memory as 4 byte alignment padding

2016-02-11 Thread Bryce Harrington
On Thu, Feb 11, 2016 at 11:34:15AM +0200, Pekka Paalanen wrote: > On Thu, 11 Feb 2016 09:47:29 +0800 > Jonas Ådahl wrote: > > > On Wed, Feb 10, 2016 at 12:37:43PM -0600, Derek Foreman wrote: > > > On 10/02/16 09:35 AM, Jonas Ådahl wrote: > > > > When we are adding padding

[PATCH] connection: Don't add uninitialized memory as 4 byte alignment padding

2016-02-10 Thread Jonas Ådahl
When we are adding padding bytes making our wl_buffer buffer content 4 byte aligned, we are just moving the pointer. Since the buffer is allocated using plain malloc(), this means our padding bytes are effectively uninitialized data, which could be anything previously allocated in the server

Re: [PATCH] connection: Don't add uninitialized memory as 4 byte alignment padding

2016-02-10 Thread Derek Foreman
On 10/02/16 09:35 AM, Jonas Ådahl wrote: > When we are adding padding bytes making our wl_buffer buffer content 4 > byte aligned, we are just moving the pointer. Since the buffer is > allocated using plain malloc(), this means our padding bytes are > effectively uninitialized data, which could be

Re: [PATCH] connection: Don't add uninitialized memory as 4 byte alignment padding

2016-02-10 Thread Jonas Ådahl
On Wed, Feb 10, 2016 at 12:37:43PM -0600, Derek Foreman wrote: > On 10/02/16 09:35 AM, Jonas Ådahl wrote: > > When we are adding padding bytes making our wl_buffer buffer content 4 > > byte aligned, we are just moving the pointer. Since the buffer is > > allocated using plain malloc(), this means