Skip to content
Snippets Groups Projects
Commit cf43603b authored by Fredrik Thulin's avatar Fredrik Thulin
Browse files

proto_read_byte_array: Don't miss n_array when ! valid.

Sending side gck_rpc_message_write_byte_array() adds length data
when valid == 0, so receiving code (this) need to parse that obviosly.
parent 49f62ea2
No related branches found
No related tags found
No related merge requests found
......@@ -257,8 +257,12 @@ proto_read_byte_array(CallState * cs, CK_BYTE_PTR * array, CK_ULONG * n_array)
return PARSE_ERROR;
if (!valid) {
/* No array, no data, just length */
if (!egg_buffer_get_uint32
(&msg->buffer, msg->parsed, &msg->parsed, &n_data))
return PARSE_ERROR;
*n_array = n_data;
*array = NULL;
*n_array = 0;
return CKR_OK;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment