git.samba.org
/
nss_wrapper.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
969f2d4
)
nwrap: fix numeric port detection in nwrap_getaddrinfo
author
Michael Adam
<obnox@samba.org>
Fri, 6 Nov 2015 09:22:10 +0000
(10:22 +0100)
committer
Michael Adam
<obnox@samba.org>
Fri, 6 Nov 2015 09:22:10 +0000
(10:22 +0100)
Only a string that can be converted to a number, is
allowed as a numeric port specification. Trailing
characters are not allowed.
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
src/nss_wrapper.c
patch
|
blob
|
history
diff --git
a/src/nss_wrapper.c
b/src/nss_wrapper.c
index 21fc10810d3f8ac0214397195da3241923f8b51a..5fd3d7b7087e4efea3d13f9b52c812bc831c15b2 100644
(file)
--- a/
src/nss_wrapper.c
+++ b/
src/nss_wrapper.c
@@
-5085,7
+5085,7
@@
static int nwrap_getaddrinfo(const char *node,
errno = 0;
sl = strtol(service, &end_ptr, 10);
- if (*end_ptr == '\0'
|| end_ptr != service
) {
+ if (*end_ptr == '\0') {
port = sl;
goto valid_port;
} else if (hints->ai_flags & AI_NUMERICSERV) {