[PATCH 1/2] hesiod: fix swapped arguments in service parser

Adhemerval Zanella adhemerval.zanella@linaro.org
Thu May 28 20:30:07 GMT 2026


The port number in the service file is a decimal number followed by a
single slash.
---
 hesiod/nss_hesiod/hesiod-service.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hesiod/nss_hesiod/hesiod-service.c b/hesiod/nss_hesiod/hesiod-service.c
index 3b5c704660a..11ee302853e 100644
--- a/hesiod/nss_hesiod/hesiod-service.c
+++ b/hesiod/nss_hesiod/hesiod-service.c
@@ -41,7 +41,7 @@ LINE_PARSER
 ("#",
  STRING_FIELD (result->s_name, ISSC_OR_SPACE, 1);
  STRING_FIELD (result->s_proto, ISSC_OR_SPACE, 1);
- INT_FIELD (result->s_port, ISSC_OR_SPACE, 10, 0, htons);
+ INT_FIELD (result->s_port, ISSC_OR_SPACE, 0, 10, htons);
  )
 
 enum nss_status
-- 
2.43.0



More information about the Libc-alpha mailing list