Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:15.5:Update
nfsidmap.26593
0005-nss.c-wrong-check-of-return-value.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0005-nss.c-wrong-check-of-return-value.patch of Package nfsidmap.26593
From e22368f6a6651e23d537f92ab5dec0ea37de8fa5 Mon Sep 17 00:00:00 2001 From: Steve Dickson <steved@redhat.com> Date: Thu, 7 Apr 2016 11:20:40 -0400 Subject: [PATCH] nss.c: wrong check of return value Fixed some NEGATIVE_RETURNS that a Covscan scan found. Signed-off-by: Steve Dickson <steved@redhat.com> --- nss.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) --- a/nss.c +++ b/nss.c @@ -186,6 +186,9 @@ static struct passwd *nss_getpwnam(const char *localname; int err = ENOMEM; + if (buflen < 0) + goto err; + buf = malloc(sizeof(*buf) + buflen); if (buf == NULL) goto err; @@ -313,8 +316,11 @@ static int _nss_name_to_gid(char *name, } } + err = -ENOMEM; + if (buflen < 0) + goto out; + do { - err = -ENOMEM; buf = malloc(buflen); if (!buf) goto out_name;
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