* lib/get_gid.c: gidstr should not be NULL, but the check was
meant to make sure it is not empty. * lib/get_uid.c: Likewise.
This commit is contained in:
parent
7b562d96b3
commit
0c6159650d
12
ChangeLog
12
ChangeLog
@ -1,3 +1,15 @@
|
||||
2009-04-22 Nicolas François <nicolas.francois@centraliens.net>
|
||||
|
||||
* lib/get_gid.c: gidstr should not be NULL, but the check was
|
||||
meant to make sure it is not empty.
|
||||
* lib/get_uid.c: Likewise.
|
||||
|
||||
2009-04-22 Nicolas François <nicolas.francois@centraliens.net>
|
||||
|
||||
* lib/getdef.c: Added splint annotations.
|
||||
* lib/getdef.c: Ignore fputs() return value.
|
||||
* lib/getdef.c: Use EXIT_FAILURE / EXIT_SUCCESS for exit()
|
||||
|
||||
2009-04-22 Nicolas François <nicolas.francois@centraliens.net>
|
||||
|
||||
* src/faillog.c: Added splint annotations.
|
||||
|
@ -41,7 +41,7 @@ int get_gid (const char *gidstr, gid_t *gid)
|
||||
|
||||
errno = 0;
|
||||
val = strtoll (gidstr, &endptr, 10);
|
||||
if ( ('\0' == gidstr)
|
||||
if ( ('\0' == *gidstr)
|
||||
|| ('\0' != *endptr)
|
||||
|| (ERANGE == errno)
|
||||
|| (val != (gid_t)val)) {
|
||||
|
@ -41,7 +41,7 @@ int get_uid (const char *uidstr, uid_t *uid)
|
||||
|
||||
errno = 0;
|
||||
val = strtoll (uidstr, &endptr, 10);
|
||||
if ( ('\0' == uidstr)
|
||||
if ( ('\0' == *uidstr)
|
||||
|| ('\0' != *endptr)
|
||||
|| (ERANGE == errno)
|
||||
|| (val != (uid_t)val)) {
|
||||
|
Loading…
Reference in New Issue
Block a user