projects
/
oweals
/
libubox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7a0571a
)
fix off-by-one in the string validation check
author
Felix Fietkau
<nbd@openwrt.org>
Mon, 31 Jan 2011 15:24:11 +0000
(16:24 +0100)
committer
Felix Fietkau
<nbd@openwrt.org>
Mon, 31 Jan 2011 15:24:11 +0000
(16:24 +0100)
blob.c
patch
|
blob
|
history
diff --git
a/blob.c
b/blob.c
index 26a23f39ae2bdb073e82b2b569eadeaee54a6396..003192ea6450d6733e79330eaf24fa574689b8f4 100644
(file)
--- a/
blob.c
+++ b/
blob.c
@@
-147,7
+147,7
@@
blob_check_type(const void *ptr, int len, int type)
return false;
}
- if (type == BLOB_ATTR_STRING && data[len] != 0)
+ if (type == BLOB_ATTR_STRING && data[len
- 1
] != 0)
return false;
return true;