[Pkg-mono-svn-commits] rev 3860 - in mono/trunk/debian: . patches

Jo Shields directhex-guest at alioth.debian.org
Sat Nov 29 21:15:20 UTC 2008


Author: directhex-guest
Date: 2008-11-29 21:15:20 +0000 (Sat, 29 Nov 2008)
New Revision: 3860

Added:
   mono/trunk/debian/patches/fix_NetworkInterface_exception_r120282.dpatch
Modified:
   mono/trunk/debian/changelog
   mono/trunk/debian/patches/00list
Log:
Make #507297 less of a problem by throwing warning rather than exception on funny network interfaces


Modified: mono/trunk/debian/changelog
===================================================================
--- mono/trunk/debian/changelog	2008-11-28 23:17:01 UTC (rev 3859)
+++ mono/trunk/debian/changelog	2008-11-29 21:15:20 UTC (rev 3860)
@@ -5,6 +5,9 @@
     + Fix bug in wsdl2 preventing parsing of Amazon Web Services 
       wsdl file (thanks to Iain Lane <laney at ubuntu.com> for help
       isolating this bug)
+  * debian/patches/fix_NetworkInterface_exception_r120282.dpatch:
+    + Warn, rather than fail, on "funny" network interfaces
+      (Closes: #507297)
 
  -- Jo Shields <directhex at apebox.org>  Fri, 28 Nov 2008 23:15:00 +0000
 

Modified: mono/trunk/debian/patches/00list
===================================================================
--- mono/trunk/debian/patches/00list	2008-11-28 23:17:01 UTC (rev 3859)
+++ mono/trunk/debian/patches/00list	2008-11-29 21:15:20 UTC (rev 3860)
@@ -8,6 +8,7 @@
 fix_BigInteger_overflow_CVE-2007-5197
 fix_implicit_pointer_conversions
 fix_wsdl2_duplicate_keys_r117243
+fix_NetworkInterface_exception_r120282
 armel-glibc-2.8
 build_genxs_2.0
 99_autoreconf

Added: mono/trunk/debian/patches/fix_NetworkInterface_exception_r120282.dpatch
===================================================================
--- mono/trunk/debian/patches/fix_NetworkInterface_exception_r120282.dpatch	                        (rev 0)
+++ mono/trunk/debian/patches/fix_NetworkInterface_exception_r120282.dpatch	2008-11-29 21:15:20 UTC (rev 3860)
@@ -0,0 +1,26 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## fix_NetworkInterface_exception_r120282.dpatch by Jo Shields <directhex at apebox.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Upstream patch to prevent System.Net.NetworkInformation.NetworkInterface from
+## DP: causing an exception on "funny" input data
+
+ at DPATCH@
+Index: mcs/class/System/System.Net.NetworkInformation/NetworkInterface.cs
+===================================================================
+--- mcs/class/System/System.Net.NetworkInformation/NetworkInterface.cs	(revision 120281)
++++ mcs/class/System/System.Net.NetworkInformation/NetworkInterface.cs	(revision 120282)
+@@ -180,8 +180,11 @@
+ 							address = new IPAddress (sockaddr.sin_addr);
+ 						} else if (sockaddr.sin_family == AF_PACKET) {
+ 							sockaddr_ll sockaddrll = (sockaddr_ll) Marshal.PtrToStructure (addr.ifa_addr, typeof (sockaddr_ll));
+-							if (((int)sockaddrll.sll_halen) > sockaddrll.sll_addr.Length)
+-								throw new SystemException("Bad hardware address length");
++							if (((int)sockaddrll.sll_halen) > sockaddrll.sll_addr.Length){
++								Console.Error.WriteLine ("Got a bad hardware address length for an AF_PACKET {0} {1}",
++											 sockaddrll.sll_halen, sockaddrll.sll_addr.Length);
++								continue;
++							}
+ 							
+ 							macAddress = new byte [(int) sockaddrll.sll_halen];
+ 							Array.Copy (sockaddrll.sll_addr, 0, macAddress, 0, macAddress.Length);




More information about the Pkg-mono-svn-commits mailing list