Code

frontend: Fix invalid command handling when receiving data in chunks.
authorSebastian Harl <sh@tokkee.org>
Wed, 14 May 2014 18:38:17 +0000 (20:38 +0200)
committerSebastian Harl <sh@tokkee.org>
Wed, 14 May 2014 18:38:17 +0000 (20:38 +0200)
commit0b34902dc2023319a5a17795aca14eeda365ed5d
treed437d5c3f737d374799359c4b8042c8a97086008
parentf813057d5060171ea345511ee02d8670eb05637e
frontend: Fix invalid command handling when receiving data in chunks.

When skipping over invalid command data, make sure not to skip more data than
what's currently available. Rather, remember how much data needs to be ignored
and do so after actually receiving it.

Added a new test which catches these cases and also provides some more
low-level communication tests.
src/frontend/connection-private.h
src/frontend/connection.c
t/unit/frontend/connection_test.c