]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
budb: SBUDB_FindLatestDump should check result of FillDumpEntry
authorMark Vitale <mvitale@sinenomine.net>
Tue, 11 Sep 2018 19:59:41 +0000 (15:59 -0400)
committerStephan Wiesand <stephan.wiesand@desy.de>
Fri, 21 Dec 2018 13:22:25 +0000 (08:22 -0500)
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 <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
(cherry picked from commit 2d8045d67686fbb80696b47b4a60e48e7e74fec9)

Change-Id: I47328fc61c492c82ae5e0cce8ca3a292706c7413
Reviewed-on: https://gerrit.openafs.org/13329
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Marcio Brito Barbosa <mbarbosa@sinenomine.net>
Reviewed-by: Cheyenne Wills <cwills@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
src/budb/procs.c

index f976ff3aa3d259675ea497fa53df71e1f1620d10..cf355762e37a350fc962813b96ee55c325d57b0f 100644 (file)
@@ -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);