[gamin] sizeof GAMPacket



Hello, 

I had problems trying to run libgamin on a linux 2.4.20-20.7, where FILENAME_MAX
is 4095.

#define GAM_PACKET_HEADER_LEN (sizeof(GAMPacket) - MAXPATHLEN)

Will set GAM_PACKET_HEADER_LEN to 11, as sizeof(GAMPacket) is bigger than the
addition of the sizeof's each field. I think there are other similar cases on
other parts of the code.

Defining MAXPATHLEN as an even number makes it work.

Sorry, C is too much of a foreign language to me to propose a decent patch.

Sergio

-------------------------------------------------
envoyé via Webmail/IMAG !




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