diff --git a/lib/portableproplib/prop_data.c b/lib/portableproplib/prop_data.c index 4d0ae2ce..e743438b 100644 --- a/lib/portableproplib/prop_data.c +++ b/lib/portableproplib/prop_data.c @@ -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.