From: Ulrich Drepper Date: Wed, 19 Nov 1997 22:54:13 +0000 (+0000) Subject: Correct logic in test for file size. X-Git-Tag: cvs/glibc-2_0_6-pre2~47 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3c3d34f3da67e964ee89318f07583b99d6686eb1;p=thirdparty%2Fglibc.git Correct logic in test for file size. --- diff --git a/intl/loadmsgcat.c b/intl/loadmsgcat.c index bcfaacb8bf4..00450cfa068 100644 --- a/intl/loadmsgcat.c +++ b/intl/loadmsgcat.c @@ -1,5 +1,5 @@ /* loadmsgcat.c -- load needed message catalogs - Copyright (C) 1995, 1996 Free Software Foundation, Inc. + Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. This file is part of the GNU C Library. Its master source is NOT part of the C library, however. The master source lives in /gd/gnu/lib. @@ -94,7 +94,7 @@ _nl_load_domain (domain_file) /* We must know about the size of the file. */ if (fstat (fd, &st) != 0 - && st.st_size < (off_t) sizeof (struct mo_file_header)) + || st.st_size < (off_t) sizeof (struct mo_file_header)) { /* Something went wrong. */ close (fd);