Hi Aurelien,
Aurelien Jarno wrote:
Benoit Hamet a écrit :

Package: i2c-2.4.27-2-k6
Version: 1:2.9.0-12
Severity: wishlist

I lose one day figuring out why my drivers were segfaulting when
registring
in i2c system. I finally notice that the size of struct adapter is not
the same between the headers chipped by the kernel-header and the one
given by i2c-source (I guess that i2c-source is the source package for
this version of the drivers).

Which files are you speaking about?
yes that's i2c.h


I have check on my system, the definition of i2c_adapter is the same in /usr/src/kernel-headers-2.4.27-2/linux/i2c.h and in /usr/src/modules/i2c/kernel/i2c.h. The ABI is the same, and a driver build with one or with the other header should work.
The main funtions are the same I agree, but take a close look at the
sizeof(struct adapter) and you will see that there _is_ a difference
which conduct to a kind of buffer overflow :/

If you want I can c&p the 2 structures.

Regards,

Benoit.

Attachment: signature.asc
Description: OpenPGP digital signature



Reply via email to