vici: Check if header has been received before processing an empty message
authorMartin Willi <martin@revosec.ch>
Wed, 7 May 2014 10:55:30 +0000 (12:55 +0200)
committerMartin Willi <martin@revosec.ch>
Wed, 7 May 2014 12:13:39 +0000 (14:13 +0200)
commit1e4ee168c80fdb9931190d511cb8bca604df8a7a
treed1913021d1903795903c0cf98a3e10846102a32d
parentafb7ef49087f26bb73d4e07402e9bdeb62ccfda1
vici: Check if header has been received before processing an empty message

If do_read() returns with EWOULDBLOCK, we must ensure that we actually have
processed the full length header before checking the zero-initialized buffer
length.
src/libcharon/plugins/vici/vici_socket.c