stat(), lstat() again.

Jim Jagielski jim at jagmac2.gsfc.nasa.gov
Sat Sep 15 04:31:48 AEST 1990


Well... if I do the following, lstat() doesn't work:

	struct stat *sbuf;
	lstat("/unix", sbuf);

But this DOES:

	struct stat sbuf;
	lstat("/unix", &sbuf);

It looks like in case #1, sbuf is pointing somewhere dangerous and when lstat
is called, memory is destroyed... 
--
=======================================================================
#include <std/disclaimer.h>
                                 =:^)
           Jim Jagielski                    NASA/GSFC, Code 711.1
     jim at jagmac2.gsfc.nasa.gov               Greenbelt, MD 20771

"Kilimanjaro is a pretty tricky climb. Most of it's up, until you reach
 the very, very top, and then it tends to slope away rather sharply."



More information about the Comp.unix.aux mailing list