libsmbclient: smbc_stat buffer overflow

Johannes Bauer dfnsonfsduifb at gmx.de
Fri Apr 27 11:29:24 GMT 2007


Hello,

first of all: sorry for not being able to follow-up your posting - it
just didn't appear on the list for me (I used the archive to read your
response). Strange.

Derrell schrieb:

> You don't indicate how you compiled this program, but I suspect that
> libsmbclient is compiled for large file support, while your application is
> not.  That would cause libsmbclient to be using different size fields in
> struct stat than your program is assuming.

Yes, that's something I didn't have on my mind at all..

> Please try compiling your program with these additional compile flags, and
> confirm that this fixes the problem (or not):
> 
>   -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64

Does the job perfectly. Awesome! Thanks a lot for the accurate and fast
response!

> Cheers,
> 
> Derrell

Cheers,
Johannes


More information about the samba-technical mailing list