diff options
author | Felix Fietkau <nbd@openwrt.org> | 2011-01-31 18:24:11 +0300 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2011-01-31 18:24:11 +0300 |
commit | f01871bc3083c777bc081358dce4d0ed0f2b464c (patch) | |
tree | cd8e0330b94ca3111e7363318781198475db70de | |
parent | 7a0571a9ff9a9adfe7563db3067f7faf81c815a9 (diff) |
fix off-by-one in the string validation check
-rw-r--r-- | blob.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; |