]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
nss_files: fix swapped arguments in service parser
authorAndreas Schwab <schwab@suse.de>
Tue, 19 May 2026 09:39:15 +0000 (11:39 +0200)
committerAndreas Schwab <schwab@suse.de>
Tue, 19 May 2026 13:20:20 +0000 (15:20 +0200)
The port number in the service file is a decimal number followed by a
single slash.

nss/nss_files/files-service.c

index 1bff1a2ab6750961098b9cb722784223b2702be6..2ba48b798d88065e30701bf480186615ab994b88 100644 (file)
@@ -32,7 +32,7 @@ struct servent_data {};
 LINE_PARSER
 ("#",
  STRING_FIELD (result->s_name, isspace, 1);
- INT_FIELD (result->s_port, ISSLASH, 10, 0, htons);
+ INT_FIELD (result->s_port, ISSLASH, 0, 10, htons);
  STRING_FIELD (result->s_proto, isspace, 1);
  )