fix off-by-one in the string validation check
This commit is contained in:
parent
7a0571a9ff
commit
f01871bc30
1 changed files with 1 additions and 1 deletions
2
blob.c
2
blob.c
|
@ -147,7 +147,7 @@ blob_check_type(const void *ptr, int len, int type)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (type == BLOB_ATTR_STRING && data[len] != 0)
|
if (type == BLOB_ATTR_STRING && data[len - 1] != 0)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in a new issue