From: Mark Vitale Date: Tue, 11 Sep 2018 19:59:41 +0000 (-0400) Subject: budb: SBUDB_FindLatestDump should check result of FillDumpEntry X-Git-Tag: upstream/1.8.3^2~18 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=82f9557c43f239c22fe1cb33d970392fdd049e29;p=packages%2Fo%2Fopenafs.git budb: SBUDB_FindLatestDump should check result of FillDumpEntry FillDumpEntry may return an error, but FindLatestDump doesn't check its result. Therefore, SBUDB_FindLatestDump may return invalid results. Instead, check the return code from FillDumpEntry and abort the call if it fails. Reviewed-on: https://gerrit.openafs.org/13312 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk (cherry picked from commit 2d8045d67686fbb80696b47b4a60e48e7e74fec9) Change-Id: I47328fc61c492c82ae5e0cce8ca3a292706c7413 Reviewed-on: https://gerrit.openafs.org/13329 Reviewed-by: Michael Meffie Reviewed-by: Marcio Brito Barbosa Reviewed-by: Cheyenne Wills Tested-by: BuildBot Reviewed-by: Stephan Wiesand --- diff --git a/src/budb/procs.c b/src/budb/procs.c index f976ff3aa..cf355762e 100644 --- a/src/budb/procs.c +++ b/src/budb/procs.c @@ -2230,7 +2230,9 @@ FindLatestDump(struct rx_call *call, char *vsname, char *dumpPath, finished: /* return the dump found */ - FillDumpEntry(ut, retdbaddr, dumpentry); + eval = FillDumpEntry(ut, retdbaddr, dumpentry); + if (eval) + ABORT(eval); code = ubik_EndTrans(ut); return (code);