From: Jeffrey Altman Date: Tue, 12 Mar 2013 04:38:05 +0000 (-0400) Subject: Windows: avoid null cellp dereference during dump X-Git-Tag: upstream/1.8.0_pre1^2~1302 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=4811f432ba51b53be4edf8288eaa61613e6b787c;p=packages%2Fo%2Fopenafs.git Windows: avoid null cellp dereference during dump When performing a memory dump if cm_ucell_t.cellp is NULL, do not attempt to print the cell name. Change-Id: I146b90b5424b93d0c52a758b33fcff1bcf441e77 Reviewed-on: http://gerrit.openafs.org/9582 Tested-by: BuildBot Reviewed-by: Jeffrey Altman --- diff --git a/src/WINNT/afsd/smb.c b/src/WINNT/afsd/smb.c index 651f8ac35..c1adc591c 100644 --- a/src/WINNT/afsd/smb.c +++ b/src/WINNT/afsd/smb.c @@ -11572,7 +11572,7 @@ int smb_DumpVCP(FILE *outputFile, char *cookie, int lock) cookie, ucellp, ucellp->cellp, ucellp->flags, ucellp->ticketLen, ucellp->kvno, ucellp->expirationTime, ucellp->gen, ucellp->userName, - ucellp->cellp->name); + ucellp->cellp ? ucellp->cellp->name : ""); WriteFile(outputFile, output, (DWORD)strlen(output), &zilch, NULL); }