add missing eof checks

This commit is contained in:
Lennart Poettering 2009-01-20 02:15:43 +01:00
parent 47a2f9e3da
commit b23efc0a4d
2 changed files with 5 additions and 2 deletions

View file

@ -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;
}