projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
fix regression in getspnam[_r] error code for insufficient buffer size
[musl]
/
src
/
network
/
getservbyname_r.c
diff --git
a/src/network/getservbyname_r.c
b/src/network/getservbyname_r.c
index
056c2f3
..
ad3d616
100644
(file)
--- a/
src/network/getservbyname_r.c
+++ b/
src/network/getservbyname_r.c
@@
-15,6
+15,8
@@
int getservbyname_r(const char *name, const char *prots,
struct service servs[MAXSERVS];
int cnt, proto, align;
+ *res = 0;
+
/* Align buffer */
align = -(uintptr_t)buf & ALIGN-1;
if (buflen < 2*sizeof(char *)+align)