[PATCH] nss_files: fix swapped arguments in service parser
Andreas Schwab
schwab@suse.de
Tue May 19 11:23:08 GMT 2026
The port number in the service file is a decimal number followed by a
single slash.
---
nss/nss_files/files-service.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/nss/nss_files/files-service.c b/nss/nss_files/files-service.c
index 1bff1a2ab6..2ba48b798d 100644
--- a/nss/nss_files/files-service.c
+++ b/nss/nss_files/files-service.c
@@ -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);
)
--
2.54.0
--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."
More information about the Libc-alpha
mailing list