proplib/prop_data: avoid 0 sized allocation reported by clang-analyzer.
This commit is contained in:
parent
c3382c5c05
commit
2130d5daa6
@ -565,8 +565,8 @@ _prop_data_internalize(prop_stack_t stack, prop_object_t *obj,
|
|||||||
NULL) == false)
|
NULL) == false)
|
||||||
return (true);
|
return (true);
|
||||||
|
|
||||||
if (len + 1 >= SIZE_MAX)
|
if (len >= SIZE_MAX)
|
||||||
return true;
|
len = 1;
|
||||||
/*
|
/*
|
||||||
* Always allocate one extra in case we don't land on an even byte
|
* Always allocate one extra in case we don't land on an even byte
|
||||||
* boundary during the decode.
|
* boundary during the decode.
|
||||||
|
Loading…
Reference in New Issue
Block a user