Update.
2004-08-04 Jakub Jelinek <jakub@redhat.com>
* resolv/inet_pton.c (inet_pton4): Disallow octal numbers. Reported
by A. Guru <a.guru@sympatico.ca>. [BZ #295]
+2004-08-04 Jakub Jelinek <jakub@redhat.com>
+
+ * resolv/inet_pton.c (inet_pton4): Disallow octal numbers. Reported
+ by A. Guru <a.guru@sympatico.ca>. [BZ #295]
+
2004-08-05 Ulrich Drepper <drepper@redhat.com>
* po/nl.po: Update from translation team.
/* int
* inet_pton4(src, dst)
- * like inet_aton() but without all the hexadecimal and shorthand.
+ * like inet_aton() but without all the hexadecimal, octal (with the
+ * exception of 0) and shorthand.
* return:
* 1 if `src' is a valid dotted quad, else 0.
* notice:
if (ch >= '0' && ch <= '9') {
u_int new = *tp * 10 + (ch - '0');
+ if (saw_digit && *tp == 0)
+ return (0);
if (new > 255)
return (0);
*tp = new;