public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/16208] New: getaddrinfo() does not detect invalid numeric services
@ 2013-11-23 15:59 shawnlandden at gmail dot com
2013-11-23 16:24 ` [Bug libc/16208] " shawnlandden at gmail dot com
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: shawnlandden at gmail dot com @ 2013-11-23 15:59 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=16208
Bug ID: 16208
Summary: getaddrinfo() does not detect invalid numeric services
Product: glibc
Version: 2.17
Status: NEW
Severity: normal
Priority: P2
Component: libc
Assignee: unassigned at sourceware dot org
Reporter: shawnlandden at gmail dot com
CC: drepper.fsp at gmail dot com
forwarded from Debian bug 192876
From: Martin Pool <mbp@sourcefrog.net>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: libc6: getaddrinfo() does not detect invalid numeric services
Date: Sun, 11 May 2003 13:00:17 +1000
Package: libc6
Version: 2.3.1-16
Severity: normal
By my reading of the getaddrinfo() manual (and also the Solaris
manpage) getaddrinfo() ought to return EAI_SERVICE when the requested
service is not available. However, it does not seem to do this when
the service is a number, but out of the valid range 1-65535 for TCP
ports.
Here is a reproduction case:
------------------
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
/* try getaddrinfo */
int main(void)
{
int err;
struct addrinfo *res;
struct addrinfo hints;
bzero(&hints, sizeof hints);
hints.ai_family = AF_INET;
hints.ai_socktype = SOCK_STREAM;
hints.ai_flags = AI_PASSIVE;
err = getaddrinfo(NULL, "80000", &hints, &res);
printf("err=%d, %s\n", err, gai_strerror(err));
return 0;
}
------------------
On my machine this returns 0, rather than the expected -8 "servname
not supported".
If I change "80000" to an invalid non-numeric string then the error
is flagged as expected.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug libc/16208] getaddrinfo() does not detect invalid numeric services
2013-11-23 15:59 [Bug libc/16208] New: getaddrinfo() does not detect invalid numeric services shawnlandden at gmail dot com
@ 2013-11-23 16:24 ` shawnlandden at gmail dot com
2013-11-23 16:25 ` shawnlandden at gmail dot com
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: shawnlandden at gmail dot com @ 2013-11-23 16:24 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=16208
--- Comment #1 from Shawn Landden <shawnlandden at gmail dot com> ---
Created attachment 7299
--> https://sourceware.org/bugzilla/attachment.cgi?id=7299&action=edit
proposed patch
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug libc/16208] getaddrinfo() does not detect invalid numeric services
2013-11-23 15:59 [Bug libc/16208] New: getaddrinfo() does not detect invalid numeric services shawnlandden at gmail dot com
2013-11-23 16:24 ` [Bug libc/16208] " shawnlandden at gmail dot com
@ 2013-11-23 16:25 ` shawnlandden at gmail dot com
2013-12-04 13:33 ` neleai at seznam dot cz
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: shawnlandden at gmail dot com @ 2013-11-23 16:25 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=16208
Shawn Landden <shawnlandden at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #7299|0 |1
is obsolete| |
--- Comment #2 from Shawn Landden <shawnlandden at gmail dot com> ---
Created attachment 7300
--> https://sourceware.org/bugzilla/attachment.cgi?id=7300&action=edit
proposed patch
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug libc/16208] getaddrinfo() does not detect invalid numeric services
2013-11-23 15:59 [Bug libc/16208] New: getaddrinfo() does not detect invalid numeric services shawnlandden at gmail dot com
2013-11-23 16:24 ` [Bug libc/16208] " shawnlandden at gmail dot com
2013-11-23 16:25 ` shawnlandden at gmail dot com
@ 2013-12-04 13:33 ` neleai at seznam dot cz
2014-02-07 2:53 ` [Bug network/16208] " jsm28 at gcc dot gnu.org
2014-06-13 11:53 ` fweimer at redhat dot com
4 siblings, 0 replies; 6+ messages in thread
From: neleai at seznam dot cz @ 2013-12-04 13:33 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=16208
Ondrej Bilka <neleai at seznam dot cz> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |neleai at seznam dot cz
--- Comment #3 from Ondrej Bilka <neleai at seznam dot cz> ---
Could you send patch to libc-alpha@sourceware.org
You need to follow
https://sourceware.org/glibc/wiki/Contribution%20checklist
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug network/16208] getaddrinfo() does not detect invalid numeric services
2013-11-23 15:59 [Bug libc/16208] New: getaddrinfo() does not detect invalid numeric services shawnlandden at gmail dot com
` (2 preceding siblings ...)
2013-12-04 13:33 ` neleai at seznam dot cz
@ 2014-02-07 2:53 ` jsm28 at gcc dot gnu.org
2014-06-13 11:53 ` fweimer at redhat dot com
4 siblings, 0 replies; 6+ messages in thread
From: jsm28 at gcc dot gnu.org @ 2014-02-07 2:53 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=16208
Joseph Myers <jsm28 at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|libc |network
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug network/16208] getaddrinfo() does not detect invalid numeric services
2013-11-23 15:59 [Bug libc/16208] New: getaddrinfo() does not detect invalid numeric services shawnlandden at gmail dot com
` (3 preceding siblings ...)
2014-02-07 2:53 ` [Bug network/16208] " jsm28 at gcc dot gnu.org
@ 2014-06-13 11:53 ` fweimer at redhat dot com
4 siblings, 0 replies; 6+ messages in thread
From: fweimer at redhat dot com @ 2014-06-13 11:53 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=16208
Florian Weimer <fweimer at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Flags| |security-
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-06-13 11:53 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-23 15:59 [Bug libc/16208] New: getaddrinfo() does not detect invalid numeric services shawnlandden at gmail dot com
2013-11-23 16:24 ` [Bug libc/16208] " shawnlandden at gmail dot com
2013-11-23 16:25 ` shawnlandden at gmail dot com
2013-12-04 13:33 ` neleai at seznam dot cz
2014-02-07 2:53 ` [Bug network/16208] " jsm28 at gcc dot gnu.org
2014-06-13 11:53 ` fweimer at redhat dot com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).