proplib/prop_data: avoid 0 sized allocation reported by clang-analyzer.

This commit is contained in:
Juan RP 2016-02-06 09:41:27 +01:00
parent c3382c5c05
commit 2130d5daa6

View File

@ -565,8 +565,8 @@ _prop_data_internalize(prop_stack_t stack, prop_object_t *obj,
NULL) == false)
return (true);
if (len + 1 >= SIZE_MAX)
return true;
if (len >= SIZE_MAX)
len = 1;
/*
* Always allocate one extra in case we don't land on an even byte
* boundary during the decode.