[uClibc]more utent fun.
Erik Andersen
andersen at codepoet.org
Wed Apr 3 12:03:22 UTC 2002
On Wed Apr 03, 2002 at 06:45:02AM -0500, Richard June wrote:
> Ok Erik, now riddle me this...
> in pututline, const struct utmp *utmp_entry is passed into it..
> later on it attempts write(ut_fd, (char *) utmp_entry, sizeof(utmp_entry));
> won't that merely write out the address of utmp_entry? isn't proper
> behaviour write(ut_fd, (char *) utmp_entry, sizeof(*utmp_entry));
Again, good spotting. This code was totally broken. It wouldn't
write out the address, but as was it would only write the first
sizeof-a-pointer bytes (i.e. 4 bytes on x86) which is clearly
wrong. Can you try out the fixeI just checked into CVS?
-Erik
--
Erik B. Andersen http://codepoet-consulting.com/
--This message was written using 73% post-consumer electrons--
More information about the uClibc
mailing list