Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:coltonisgod2342:mydistro
glibc
getaddrinfo-eai-memory.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File getaddrinfo-eai-memory.patch of Package glibc
From e555136995290319c1c49d2038a8ccb75b5d141c Mon Sep 17 00:00:00 2001 From: Andreas Schwab <schwab@suse.de> Date: Wed, 6 Dec 2023 14:48:22 +0100 Subject: [PATCH] getaddrinfo: translate ENOMEM to EAI_MEMORY (bug 31163) When __resolv_context_get returns NULL due to out of memory, translate it to a return value of EAI_MEMORY. --- sysdeps/posix/getaddrinfo.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c index c38b4ce93b..cce332eaa5 100644 --- a/sysdeps/posix/getaddrinfo.c +++ b/sysdeps/posix/getaddrinfo.c @@ -756,7 +756,14 @@ gaih_inet (const char *name, const struct gaih_service *service, function variant. */ res_ctx = __resolv_context_get (); if (res_ctx == NULL) - no_more = 1; + { + if (errno == ENOMEM) + { + result = -EAI_MEMORY; + goto free_and_return; + } + no_more = 1; + } while (!no_more) { -- 2.43.0
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor