diff options
| author | Matt Turner <mattst88@gmail.com> | 2009-11-10 21:12:55 +0000 |
|---|---|---|
| committer | Joseph Myers <joseph@codesourcery.com> | 2009-11-10 21:12:55 +0000 |
| commit | 52c693bd745209dfb9aacce873d516fc369d1e7c (patch) | |
| tree | 454f3eb375c0c50755757a6eeda606bde2a74dea | |
| parent | 1789cafb5705e51f83cdc2befa74fc9932e77f3c (diff) | |
| download | glibc-52c693bd745209dfb9aacce873d516fc369d1e7c.tar.xz glibc-52c693bd745209dfb9aacce873d516fc369d1e7c.zip | |
Fix alpha __fxstatat for empty file names.
[BZ #10609]
* sysdeps/unix/sysv/linux/alpha/fxstatat.c (__fxstatat): Fix handling
of empty parameters for file names.
| -rw-r--r-- | ChangeLog.alpha | 6 | ||||
| -rw-r--r-- | sysdeps/unix/sysv/linux/alpha/fxstatat.c | 8 |
2 files changed, 13 insertions, 1 deletions
diff --git a/ChangeLog.alpha b/ChangeLog.alpha index eb23873a9e..5a9b442ee3 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,3 +1,9 @@ +2009-11-10 Matt Turner <mattst88@gmail.com> + + [BZ #10609] + * sysdeps/unix/sysv/linux/alpha/fxstatat.c (__fxstatat): Fix handling + of empty parameters for file names. + 2009-07-13 Aurelien Jarno <aurelien@aurel32.net> [BZ #10158] diff --git a/sysdeps/unix/sysv/linux/alpha/fxstatat.c b/sysdeps/unix/sysv/linux/alpha/fxstatat.c index 497694619a..66cf4f7229 100644 --- a/sysdeps/unix/sysv/linux/alpha/fxstatat.c +++ b/sysdeps/unix/sysv/linux/alpha/fxstatat.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2005, 2006 Free Software Foundation, Inc. +/* Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -46,6 +46,12 @@ __fxstatat (int vers, int fd, const char *file, struct stat *st, int flag) if (fd != AT_FDCWD && file[0] != '/') { size_t filelen = strlen (file); + if (__builtin_expect (filelen == 0, 0)) + { + __set_errno (ENOENT); + return -1; + } + static const char procfd[] = "/proc/self/fd/%d/%s"; /* Buffer for the path name we are going to use. It consists of - the string /proc/self/fd/ |
