diff options
author | Andreas Schwab <schwab@suse.de> | 2013-11-11 12:24:42 +0100 |
---|---|---|
committer | Andreas Schwab <schwab@suse.de> | 2013-11-11 12:26:32 +0100 |
commit | 8ec3f656d6edf6f16216105131fc8b0542216a5b (patch) | |
tree | 25930564f7938815cc886d5b5d6f355a7c1f6a75 /nscd | |
parent | 43d5c02c72bdaf59a8e0d4b06f2ae87e42269cbd (diff) | |
download | glibc-8ec3f656d6edf6f16216105131fc8b0542216a5b.tar glibc-8ec3f656d6edf6f16216105131fc8b0542216a5b.tar.gz glibc-8ec3f656d6edf6f16216105131fc8b0542216a5b.tar.bz2 glibc-8ec3f656d6edf6f16216105131fc8b0542216a5b.zip |
Fix off-by-one in nscd getservbyport call
Diffstat (limited to 'nscd')
-rw-r--r-- | nscd/nscd_getserv_r.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/nscd/nscd_getserv_r.c b/nscd/nscd_getserv_r.c index c9c890c63c..772825854d 100644 --- a/nscd/nscd_getserv_r.c +++ b/nscd/nscd_getserv_r.c @@ -54,7 +54,7 @@ __nscd_getservbyport_r (int port, const char *proto, portstr[sizeof (portstr) - 1] = '\0'; char *cp = _itoa_word (port, portstr + sizeof (portstr) - 1, 10, 0); - return nscd_getserv_r (cp, portstr + sizeof (portstr) - cp, proto, + return nscd_getserv_r (cp, portstr + sizeof (portstr) - 1 - cp, proto, GETSERVBYPORT, result_buf, buf, buflen, result); } |