public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug network/26830] New: gai_strerror(EAI_OVERFLOW) reports nothing useful
@ 2020-11-02 12:51 jengelh at inai dot de
2022-06-04 17:02 ` [Bug network/26830] " rob.ross at ymail dot com
0 siblings, 1 reply; 2+ messages in thread
From: jengelh at inai dot de @ 2020-11-02 12:51 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=26830
Bug ID: 26830
Summary: gai_strerror(EAI_OVERFLOW) reports nothing useful
Product: glibc
Version: 2.32
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: network
Assignee: unassigned at sourceware dot org
Reporter: jengelh at inai dot de
Target Milestone: ---
Testcase:
#include <netdb.h>
#include <stdio.h>
#include <arpa/inet.h>
int main()
{
struct sockaddr_in6 sa;
inet_pton(AF_INET6, "2001:db8::1", &sa.sin6_addr);
sa.sin6_family = AF_INET6;
char host[2]; /* deliberately small */
int ret = getnameinfo((struct sockaddr *)&sa, sizeof(sa), host,
sizeof(host), NULL, 0, NI_NUMERICHOST | NI_NUMERICSERV);
if (ret != 0)
printf("%s\n", gai_strerror(ret));
}
Observed:
"Unknown error"
Expected to see:
"Buffer too small" or something
Reason:
There is no error string defined for EAI_OVERFLOW (and possibly other codes).
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug network/26830] gai_strerror(EAI_OVERFLOW) reports nothing useful
2020-11-02 12:51 [Bug network/26830] New: gai_strerror(EAI_OVERFLOW) reports nothing useful jengelh at inai dot de
@ 2022-06-04 17:02 ` rob.ross at ymail dot com
0 siblings, 0 replies; 2+ messages in thread
From: rob.ross at ymail dot com @ 2022-06-04 17:02 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=26830
Rob Ross <rob.ross at ymail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |rob.ross at ymail dot com
--- Comment #1 from Rob Ross <rob.ross at ymail dot com> ---
This bug is still present in master (commit 3c23fa9f at June 3 2022). A
minimal test case is
#include <stdio.h>
#include <netdb.h>
int main()
{
puts(gai_strerror(EAI_OVERFLOW));
}
Notice that sysdeps/posix/gai_strerror-strs.h is missing an entry for
EAI_OVERFLOW.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-06-04 17:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-02 12:51 [Bug network/26830] New: gai_strerror(EAI_OVERFLOW) reports nothing useful jengelh at inai dot de
2022-06-04 17:02 ` [Bug network/26830] " rob.ross at ymail 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).