Open bontric opened 8 years ago
How can this happen? Is there a test, that covers this situation?
Ah.. I see. Quoting unpack.c:
/* if array is empty return success */
if (obj->via.array.size <= 0) {
params->obj = NULL;
params->size = 0;
return (0);
}
As far as I see, iff meta->obj
is NULL
, then meta->size
is set to zero. Since the size is tested before accessing obj
there should be no problem?
if (meta->size != 5) {
error_set(api_error, API_ERROR_TYPE_VALIDATION,
"Error dispatching register API request. Invalid meta params size");
return (-1);
}
:+1:
seem like meta->obj can not be null
Well, yes it can be null as mentioned above. If so, the size is set to zero which is checked.
Well, yes it can be null as mentioned above
Didn't see that comment..
Is it ok to close issue?
The check still needs to be removed
meta
is a pointer to amessage_params_object
stored in amessage_object
and therefore can't be NULL.meta->obj
could potentially beNULL
though and there is no check for it!