rm could malfunction under unusual circumstances:
commit689186b88ccf025664ca24ac8efa68699f12d85d
authorJim Meyering <meyering@redhat.com>
Sun, 7 Oct 2007 20:58:29 +0000 (7 22:58 +0200)
committerJim Meyering <meyering@redhat.com>
Mon, 8 Oct 2007 08:26:05 +0000 (8 10:26 +0200)
treeb6faf98bf79d91a4fbf2dee8ff1c47fd439f3999
parent035a5ca2b0fb83ca179ed7739e18bb60437bc525
rm could malfunction under unusual circumstances:

When operating on a relative name longer than 511 bytes,
and (when either processing a directory that is neither writable
nor readable (but still searchable) or when determining whether
to prompt), and encountering an ENOMEM error while forming the
file name, rm would operate on a truncated-to-511-byte name
starting with "[...]" rather than the intended one.
* NEWS: Describe the bugs.
* src/remove.c: Correct two misuses of full_filename:
(full_filename0, xfull_filename): New functions.
(full_filename_): Rewrite to use full_filename0.
(AD_pop_and_chdir): Use xfull_filename, not full_filename.
(write_protected_non_symlink): Likewise.
ChangeLog
NEWS
src/c99-to-c89.diff
src/remove.c