[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gawk-stable] bug: fatal error when getline from directory

From: Andreas Schwab
Subject: Re: [gawk-stable] bug: fatal error when getline from directory
Date: Sun, 04 Jan 2009 16:25:10 +0100
User-agent: Gnus/5.110009 (No Gnus v0.9) Emacs/22.3 (gnu/linux)

Eric Blake <address@hidden> writes:

> But there is no ambiguity - it excludes directories, in part because
> directory entries contain NUL bytes (guaranteed by the wording in
> http://www.opengroup.org/onlinepubs/9699919799/basedefs/dirent.h.html#tag_13_08,
> which states that d_name includes a terminating NUL), and in part, because
> the last directory entry does not necessarily end in a newline.

The contents described by struct dirent are cooked values, there is no
requirement that they match the raw contents of a directory file, which
you would get when you read(2) it (if that is possible at all).


Andreas Schwab, SuSE Labs, address@hidden
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

reply via email to

[Prev in Thread] Current Thread [Next in Thread]