]> sourceware.org Git - glibc.git/commitdiff
Fix range error handling in sgetspent.
authorAndreas Schwab <schwab@redhat.com>
Wed, 2 Feb 2011 13:59:04 +0000 (08:59 -0500)
committerUlrich Drepper <drepper@gmail.com>
Wed, 2 Feb 2011 13:59:04 +0000 (08:59 -0500)
ChangeLog
shadow/sgetspent.c

index 0dad46baceaa725e9e291c090f7bd0cdf2ba19b1..24506f0d077c692c3a3688fb9e3bd540bb64df81 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-02-02  Andreas Schwab  <schwab@redhat.com>
+
+       * shadow/sgetspent.c: Check return value of __sgetspent_r instead
+       of errno.
+
 2011-01-19  Ulrich Drepper  <drepper@gmail.com>
 
        [BZ #11724]
index ec7f384fa65bb97aa47509344f5cb7bfe8111b05..f3dce53ea3051297762643afc99ce04a0fb2bf04 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 2011 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
@@ -49,8 +49,8 @@ sgetspent (const char *string)
     }
 
   while (buffer != NULL
-        && __sgetspent_r (string, &resbuf, buffer, buffer_size, &result) != 0
-        && errno == ERANGE)
+        && (__sgetspent_r (string, &resbuf, buffer, buffer_size, &result)
+            == ERANGE))
     {
       char *new_buf;
       buffer_size += BUFLEN_SPWD;
This page took 0.065244 seconds and 5 git commands to generate.