projects
/
oweals
/
musl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5948bc1
)
fix regression in getspnam[_r] error code for insufficient buffer size
author
Rich Felker
<dalias@aerifal.cx>
Wed, 21 Jun 2017 23:06:45 +0000
(19:06 -0400)
committer
Rich Felker
<dalias@aerifal.cx>
Wed, 21 Jun 2017 23:06:45 +0000
(19:06 -0400)
commit
2d7d05f031e014068a61d3076c6178513395d2ae
wrongly changed ERANGE
to EINVAL, likely as the result of copy-and-paste error.
src/passwd/getspnam_r.c
patch
|
blob
|
history
diff --git
a/src/passwd/getspnam_r.c
b/src/passwd/getspnam_r.c
index e488b67f5d850d33ae703dcfc0aa350611479c72..541206fa14db8dcea55f26dc24e070c88583ac72 100644
(file)
--- a/
src/passwd/getspnam_r.c
+++ b/
src/passwd/getspnam_r.c
@@
-76,7
+76,7
@@
int getspnam_r(const char *name, struct spwd *sp, char *buf, size_t size, struct
/* Buffer size must at least be able to hold name, plus some.. */
if (size < l+100)
- return errno = E
INVAL
;
+ return errno = E
RANGE
;
/* Protect against truncation */
if (snprintf(path, sizeof path, "/etc/tcb/%s/shadow", name) >= sizeof path)