Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-15:Update
nfsidmap.26593
0002-Handle-NULL-names-better.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0002-Handle-NULL-names-better.patch of Package nfsidmap.26593
From 82718594eb8e6afabc572cea2da1caab69e9a720 Mon Sep 17 00:00:00 2001 From: Steve Dickson <steved@redhat.com> Date: Thu, 30 Apr 2015 13:55:32 -0400 Subject: [PATCH] Handle NULL names better Detect when an application passes in NULL names and fail gracefully instead of crashing hard. Signed-off-by: Steve Dickson <steved@redhat.com> --- libnfsidmap.c | 5 ++++- nss.c | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) --- a/libnfsidmap.c +++ b/libnfsidmap.c @@ -102,8 +102,11 @@ static char * toupper_str(char *s) static int id_as_chars(char *name, int *id) { - long int value = strtol(name, NULL, 10); + long int value; + if (name == NULL) + return 0; + value = strtol(name, NULL, 10); if (value == 0) { /* zero value ids are valid */ if (strcmp(name, "0") != 0) --- a/nss.c +++ b/nss.c @@ -149,6 +149,9 @@ static char *strip_domain(const char *na char *l = NULL; int len; + if (name == NULL) + goto out; + c = strrchr(name, '@'); if (c == NULL && domain != NULL) goto out;
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