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) 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.