projects
/
platform
/
upstream
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3c51a3a
)
util/fossilize_db: Reset file position to parsed_offset on cache_offset read failure.
author
Bas Nieuwenhuizen
<bas@basnieuwenhuizen.nl>
Thu, 5 Aug 2021 01:03:48 +0000
(
03:03
+0200)
committer
Marge Bot
<eric+marge@anholt.net>
Sat, 7 Aug 2021 20:06:31 +0000
(20:06 +0000)
Otherwise we might restart reading from the middle of the entry.
Fixes:
2ec1bff0f3a
"util/fossilize_db: Split out reading the index."
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12204>
src/util/fossilize_db.c
patch
|
blob
|
history
diff --git
a/src/util/fossilize_db.c
b/src/util/fossilize_db.c
index
8a38081
..
6737cf2
100644
(file)
--- a/
src/util/fossilize_db.c
+++ b/
src/util/fossilize_db.c
@@
-157,7
+157,7
@@
update_foz_index(struct foz_db *foz_db, FILE *db_idx, unsigned file_idx)
uint64_t cache_offset;
if (fread(&cache_offset, 1, sizeof(cache_offset), db_idx) !=
sizeof(cache_offset))
-
return
;
+
break
;
entry->offset = cache_offset;