libcli: continue to read from the socket even if the size is 0
authorMatthieu Patou <mat@matws.net>
Thu, 19 Sep 2013 18:18:32 +0000 (11:18 -0700)
committerKarolin Seeger <kseeger@samba.org>
Fri, 20 Sep 2013 07:14:05 +0000 (09:14 +0200)
commit676b5de4cfbdbbcb36277ed1c9594812c55b7e0a
treee4c3bb909e726cc8d12480ccd92d112e5999db33
parenta75cbcd5b7d5c5432e807c5dfc69ee9a846a5537
libcli: continue to read from the socket even if the size is 0

This is an issue found by Codenomicon, with a malicious packet with 0
bytes UDP payload we will continiously be looping trying to react from
the socket event and continiously do nothing as we will bail out
thinking that we had a memory allocation error.

Original fix comes from Volker Lendecke <vl@samba.org>

Signed-off-by: Matthieu Patou <mat@matws.net>
Fix bug #10158 - netbios related samba process consume 100% CPU.
source4/libcli/dgram/dgramsocket.c