mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-10-29 05:40:23 -04:00
add missing eof checks
This commit is contained in:
parent
47a2f9e3da
commit
b23efc0a4d
2 changed files with 5 additions and 2 deletions
|
|
@ -366,7 +366,8 @@ int pa_context_handle_error(pa_context *c, uint32_t command, pa_tagstruct *t, pa
|
|||
if (command == PA_COMMAND_ERROR) {
|
||||
pa_assert(t);
|
||||
|
||||
if (pa_tagstruct_getu32(t, &err) < 0) {
|
||||
if (pa_tagstruct_getu32(t, &err) < 0 ||
|
||||
!pa_tagstruct_eof(t)) {
|
||||
pa_context_fail(c, PA_ERR_PROTOCOL);
|
||||
return -1;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2484,7 +2484,9 @@ static void command_create_upload_stream(pa_pdispatch *pd, uint32_t command, uin
|
|||
|
||||
p = pa_proplist_new();
|
||||
|
||||
if (c->version >= 13 && pa_tagstruct_get_proplist(t, p) < 0) {
|
||||
if ((c->version >= 13 && pa_tagstruct_get_proplist(t, p) < 0) ||
|
||||
!pa_tagstruct_eof(t)) {
|
||||
|
||||
protocol_error(c);
|
||||
pa_proplist_free(p);
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue