olga / rpms / glibc

Forked from rpms/glibc 5 years ago
Clone

Blame SOURCES/glibc-rh1634021.patch

00db10
commit 8ec3f656d6edf6f16216105131fc8b0542216a5b
00db10
Author: Andreas Schwab <schwab@suse.de>
00db10
Date:   Mon Nov 11 12:24:42 2013 +0100
00db10
00db10
    Fix off-by-one in nscd getservbyport call
00db10
00db10
diff --git a/nscd/nscd_getserv_r.c b/nscd/nscd_getserv_r.c
00db10
index c9c890c..7728258 100644
00db10
--- a/nscd/nscd_getserv_r.c
00db10
+++ b/nscd/nscd_getserv_r.c
00db10
@@ -54,7 +54,7 @@ __nscd_getservbyport_r (int port, const char *proto,
00db10
   portstr[sizeof (portstr) - 1] = '\0';
00db10
   char *cp = _itoa_word (port, portstr + sizeof (portstr) - 1, 10, 0);
00db10
 
00db10
-  return nscd_getserv_r (cp, portstr + sizeof (portstr) - cp, proto,
00db10
+  return nscd_getserv_r (cp, portstr + sizeof (portstr) - 1 - cp, proto,
00db10
 			 GETSERVBYPORT, result_buf, buf, buflen, result);
00db10
 }
00db10