rpc-gssd.service has status failed (due to rpc.gssd segfault).
Subsystems (2)
PATCH 1/1 rpc-gssd.service has status failed (due to rpc.gssd segfault).
From: Paulo Andrade <[email protected]>
Ensure strings are not NULL before doing a strdup() in error path.
Signed-off-by Steve Dickson <[email protected]>
--- utils/gssd/gssd.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
utils/gssd/gssd.c +4 -4
@@ -365,12 +365,12 @@ gssd_read_service_info(int dirfd, struct clnt_info *clp) fail:printerr (0 ,"ERROR: failed to parse %s/info\n" , clp->relpath); - clp->upcall_address =strdup (address); - clp->upcall_port =strdup (port); + clp->upcall_address = address ?strdup (address) :NULL ; + clp->upcall_port = port ?strdup (port) :NULL ; clp->upcall_program = program; clp->upcall_vers = version; - clp->upcall_protoname =strdup (protoname); - clp->upcall_service =strdup (service); + clp->upcall_protoname = protoname ?strdup (protoname) :NULL ; + clp->upcall_service = service ?strdup (service) :NULL ;free (servername);free (protoname); clp->servicename =NULL ;
Signature · 1 line
2.45.2
Quoted 6 lines · Steve Dickson
From: Paulo Andrade <[email protected]>
Ensure strings are not NULL before doing a
strdup()in error path.Signed-off-by Steve Dickson <[email protected]>
Committed...
steved.
Quoted 25 lines
--- utils/gssd/gssd.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)utils/gssd/gssd.c +4
-4@@ -365,12 +365,12 @@ gssd_read_service_info(int dirfd, struct clnt_info *clp) fail:printerr (0 ,"ERROR: failed to parse %s/info\n" , clp->relpath); - clp->upcall_address =strdup (address); - clp->upcall_port =strdup (port); + clp->upcall_address = address ?strdup (address) :NULL ; + clp->upcall_port = port ?strdup (port) :NULL ; clp->upcall_program = program; clp->upcall_vers = version; - clp->upcall_protoname =strdup (protoname); - clp->upcall_service =strdup (service); + clp->upcall_protoname = protoname ?strdup (protoname) :NULL ; + clp->upcall_service = service ?strdup (service) :NULL ;free (servername);free (protoname); clp->servicename =NULL ;