projects
/
platform
/
upstream
/
glibc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Update.
[platform/upstream/glibc.git]
/
catgets
/
catgets.c
diff --git
a/catgets/catgets.c
b/catgets/catgets.c
index
248b552
..
b11cc59
100644
(file)
--- a/
catgets/catgets.c
+++ b/
catgets/catgets.c
@@
-114,6
+114,13
@@
catclose (nl_catd catalog_desc)
{
__nl_catd catalog;
+ /* Be generous if catalog which failed to be open is used. */
+ if (catalog_desc == (nl_catd) -1)
+ {
+ __set_errno (EBADF);
+ return -1;
+ }
+
catalog = (__nl_catd) catalog_desc;
#ifdef _POSIX_MAPPED_FILES