From 30d13751354ba7eeabbce754b06650b99884c3c3 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 9 Aug 2001 22:37:19 +0000 Subject: Update. 2001-08-09 Jakub Jelinek * catgets/catgets.c (catclose): Be liberal about catalog_desc in catclose too. * time/tst-strptime.c: Add test case for %U and %W handling. --- catgets/catgets.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'catgets') diff --git a/catgets/catgets.c b/catgets/catgets.c index 248b552..b11cc59 100644 --- 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 -- cgit v1.1