Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

strings in objects API #185

Merged
merged 17 commits into from
Jun 14, 2024
8 changes: 8 additions & 0 deletions core/pbcc_actions_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,14 @@ enum pubnub_res pbcc_form_the_action_object_str(struct pbcc_context* pb,
*val);
return PNR_INVALID_PARAMETERS;
}
if (('\"' != *action_type) || ('\"' != *(action_type + pb_strnlen_s(action_type, PUBNUB_MAX_OBJECT_LENGTH) - 1))) {
PUBNUB_LOG_ERROR("pbcc_form_the_action_object(pbcc=%p) - "
"quotation marks on value ends are missing: "
Xavrax marked this conversation as resolved.
Show resolved Hide resolved
"action_type = %s\n",
pb,
action_type);
return PNR_INVALID_PARAMETERS;
}

if (buffer_size < sizeof("{\"type\":\"\",\"value\":,\"user_id\":\"\"}") +
pb_strnlen_s(action_type, MAX_ACTION_TYPE_LENGTH) +
Expand Down
Loading