]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
_nl_load_locale() incorrectly handles mmap() failures
authorJoe Landers <jlanders@vmware.com>
Fri, 22 Jan 2010 20:44:58 +0000 (12:44 -0800)
committerPetr Baudis <pasky@ucw.cz>
Tue, 11 May 2010 23:39:27 +0000 (01:39 +0200)
(cherry picked from commit 8b2f25c23374fe79645499b8095f0d2f6eb24f71)

ChangeLog
locale/loadlocale.c

index 4f777321f1c4eea212626cf4cf5da86d3c90c8be..a9e21bfd0aee1a1756a8ba2a22f863fa7750b2c8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2010-01-22  Ulrich Drepper  <drepper@redhat.com>
+
+       * locale/loadlocale.c (_nl_load_locale): Fix recognition of genuine
+       mmap resource problem.  Patch by Joe Landers <jlanders@vmware.com>.
+
 2010-01-22  Jim Meyering  <jim@meyering.net>
 
        [BZ #11184]
index 467dff157a4ec6f0e97bceefda0274553539a891..b91941eae95bdec33a669c72639647254f3eb0b5 100644 (file)
@@ -224,6 +224,7 @@ _nl_load_locale (struct loaded_l10nfile *file, int category)
                     PROT_READ, MAP_FILE|MAP_COPY, fd, 0);
   if (__builtin_expect (filedata == MAP_FAILED, 0))
     {
+      filedata = NULL;
       if (__builtin_expect (errno, ENOSYS) == ENOSYS)
        {
 #endif /* _POSIX_MAPPED_FILES */