On 20 January 2013 03:51, Anthony G. Basile <[email protected]> wrote: > Hi Bernhard, > > Following your "statfs: support f_frsize" commit a couple of days ago, > statvfs is broken. Here's a little poc: > > #include <sys/statvfs.h> > int main() { > struct statvfs mystat; > statvfs("/usr/portage/distfiles", &mystat); > return 0; > } > > which dies with > > *** stack smashing detected ***: ./poc terminated > Killed > > Looks like buf->__f_spare is not getting properly zeroed at line 48 of > libc/misc/statfs/internal_statvfs.c. Reverting to 6 ints fixes it:
except that the struct is 5 nowadays, not 6. I'll play with the alignment.. > > - memset (buf->__f_spare, '\0', sizeof(fsbuf.f_spare)); > + memset (buf->__f_spare, '\0', 6 * sizeof(int)); Thanks for the heads-up though. cheers, _______________________________________________ uClibc mailing list [email protected] http://lists.busybox.net/mailman/listinfo/uclibc
