This patch fixes CVE-2010-2244 and avoids CVE-2011-1002 while doing so.

See commit 46109dfec75534fe270c0ab902576f685d5ab3a6

http://www.openwall.com/lists/oss-security/2010/06/23/4
https://bugzilla.redhat.com/show_bug.cgi?id=667187

--- a/avahi-core/socket.c	2011-02-28 16:08:53.616147883 +0000
+++ b/avahi-core/socket.c	2011-02-28 16:10:57.965875015 +0000
@@ -678,6 +678,11 @@
         goto fail;
     }
 
+	/* For corrupt packets FIONREAD returns zero size (See rhbz #607297). So
+	 * fail after having read them so that they don't stay queued. */
+	if (!ms)
+		goto fail;
+
     if (sa.sin_addr.s_addr == INADDR_ANY) {
         /* Linux 2.4 behaves very strangely sometimes! */
         goto fail;
