projects
/
platform
/
kernel
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
89ab1e2
)
fs/squashfs: fix sqfs_read_sblk()
author
Heinrich Schuchardt
<heinrich.schuchardt@canonical.com>
Tue, 10 May 2022 19:53:25 +0000
(21:53 +0200)
committer
Tom Rini
<trini@konsulko.com>
Mon, 6 Jun 2022 21:47:17 +0000
(17:47 -0400)
Setting sblk = NULL has no effect on the caller.
We want to set *sblk = NULL if an error occurrs to avoid usage after free.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
fs/squashfs/sqfs.c
patch
|
blob
|
history
diff --git
a/fs/squashfs/sqfs.c
b/fs/squashfs/sqfs.c
index
547d2fd
..
90bf32c
100644
(file)
--- a/
fs/squashfs/sqfs.c
+++ b/
fs/squashfs/sqfs.c
@@
-49,7
+49,7
@@
static int sqfs_read_sblk(struct squashfs_super_block **sblk)
if (sqfs_disk_read(0, 1, *sblk) != 1) {
free(*sblk);
- sblk = NULL;
+
*
sblk = NULL;
return -EINVAL;
}