projects
/
project
/
libubox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cce5e35
)
blob: clear buf->head when freeing a buffer
author
Felix Fietkau
<nbd@nbd.name>
Thu, 10 Feb 2022 20:02:16 +0000
(21:02 +0100)
committer
Felix Fietkau
<nbd@nbd.name>
Thu, 10 Feb 2022 20:02:20 +0000
(21:02 +0100)
Prevents accidental silent use-after-free bugs
Signed-off-by: Felix Fietkau <nbd@nbd.name>
blob.c
patch
|
blob
|
history
diff --git
a/blob.c
b/blob.c
index bd66d78fee47ca4a2114e500baabcae87262491e..65adb139553f88766eb075f720a5687fe8f3ad28 100644
(file)
--- a/
blob.c
+++ b/
blob.c
@@
-105,6
+105,7
@@
blob_buf_free(struct blob_buf *buf)
{
free(buf->buf);
buf->buf = NULL;
+ buf->head = NULL;
buf->buflen = 0;
}