This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch master updated. glibc-2.18-370-ge436815


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  e4368156e64e04a204d832351abcb535572eb919 (commit)
      from  8d6bb57c44557c344d56653c3380885bf1dcabd7 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e4368156e64e04a204d832351abcb535572eb919

commit e4368156e64e04a204d832351abcb535572eb919
Author: OndÅ?ej Bílka <neleai@seznam.cz>
Date:   Thu Nov 7 12:46:57 2013 +0100

    Make getent services compliant with  RFC 6335 section 5.1 Fixes bug 15374
    
    The RFC 6335 allows services that start with digit (like 3com-tsmux).
    These were parsed as port number which this patch fixes.

diff --git a/ChangeLog b/ChangeLog
index 3b65d5a..0cd3374 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2013-11-07  OndÅ?ej Bílka  <neleai@seznam.cz>
+
+	[BZ #15374]
+	* nss/getent.c (services_keys): Recognize services starting with digit.
+
 2013-11-06  David S. Miller  <davem@davemloft.net>
 
 	[BZ #15985]
diff --git a/NEWS b/NEWS
index bb1db5b..6a72724 100644
--- a/NEWS
+++ b/NEWS
@@ -11,13 +11,13 @@ Version 2.19
 
   156, 431, 832, 2801, 7003, 9954, 10278, 11087, 13028, 13982, 13985,
   14029, 14155, 14547, 14699, 14752, 14876, 14910, 15048, 15218, 15277,
-  15308, 15362, 15400, 15427, 15522, 15531, 15532, 15608, 15609, 15610,
-  15632, 15640, 15670, 15672, 15680, 15681, 15723, 15734, 15735, 15736,
-  15748, 15749, 15754, 15760, 15763, 15764, 15797, 15799, 15825, 15844,
-  15847, 15849, 15855, 15856, 15857, 15859, 15867, 15886, 15887, 15890,
-  15892, 15893, 15895, 15897, 15905, 15909, 15917, 15919, 15921, 15923,
-  15939, 15948, 15963, 15966, 15985, 15988, 16032, 16034, 16036, 16037,
-  16041, 16071, 16072, 16074, 16078, 16112.
+  15308, 15362, 15374, 15400, 15427, 15522, 15531, 15532, 15608, 15609,
+  15610, 15632, 15640, 15670, 15672, 15680, 15681, 15723, 15734, 15735,
+  15736, 15748, 15749, 15754, 15760, 15763, 15764, 15797, 15799, 15825,
+  15844, 15847, 15849, 15855, 15856, 15857, 15859, 15867, 15886, 15887,
+  15890, 15892, 15893, 15895, 15897, 15905, 15909, 15917, 15919, 15921,
+  15923, 15939, 15948, 15963, 15966, 15985, 15988, 16032, 16034, 16036,
+  16037, 16041, 16071, 16072, 16074, 16078, 16112.
 
 * CVE-2012-4412 The strcoll implementation caches indices and rules for
   large collation sequences to optimize multiple passes.  This cache
diff --git a/nss/getent.c b/nss/getent.c
index 8a3c864..05ea808 100644
--- a/nss/getent.c
+++ b/nss/getent.c
@@ -788,8 +788,12 @@ services_keys (int number, char *key[])
       if (proto != NULL)
 	*proto++ = '\0';
 
-      if (isdigit (key[i][0]))
-	serv = getservbyport (htons (atol (key[i])), proto);
+      char *endptr;
+      long port = strtol (key[i], &endptr, 10);
+
+      if (isdigit (key[i][0]) && *endptr == '\0'
+	  && 0 <= port && port <= 65535)
+	serv = getservbyport (htons (port), proto);
       else
 	serv = getservbyname (key[i], proto);
 

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog    |    5 +++++
 NEWS         |   14 +++++++-------
 nss/getent.c |    8 ++++++--
 3 files changed, 18 insertions(+), 9 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]