Masamichi HOSODA <truer...@sea.plala.or.jp> writes: > How about this patch? > > --- librestrict/xstatconv.c.org 2014-10-19 09:52:52.951262300 +0900 > +++ librestrict/xstatconv.c 2014-11-01 20:26:35.734854500 +0900 > @@ -48,20 +48,16 @@ > { > struct stat *buf = ubuf; > > + /* zero clear */ > + memset(buf, 0, sizeof(*buf)); > /* Convert to current kernel version of `struct stat'. */ > buf->st_dev = kbuf->st_dev;
On the surface of it, this looks very reasonable. However, since everything is guarded with #ifdef and similar and the definitions are probably generated by autoconf, it would appear that different versions of stat.h are employed in the compilation and the resulting mismatch of definitions and structures (possibly between host and target definitions) could lead to crashes and memory corruption. So it would seem like a good idea to first figure out what goes wrong here before fixing it in this manner. It might be a nice fix (and the code certainly looks nicer for it) but I have no idea if it is correct. The "if it were that easy, it would have been written like that in the first place" mantra may be wrong surprisingly often, but it would still be nice to make sure. -- David Kastrup _______________________________________________ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel