Skip to contentSkip to conversation

[6545] Fix SIGSEGV crash in slirp networking code

Qemu-devel Blue Swirl 1 participant 1 message Feb 6, 2009

lore
Share & tools
lore

Blue Swirl

author
#0 lore raw

Revision: 6545

          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6545
Author:   blueswir1
Date:     2009-02-06 21:37:40 +0000 (Fri, 06 Feb 2009)

Log Message:
-----------
Fix SIGSEGV crash in slirp networking code

Fix SIGSEGV crash in networking code (bug was introduced in r6288). Thanks to Gleb Natapov for finding this fix.

Modified Paths:
--------------
trunk/slirp/ip_input.c

Modified: trunk/slirp/ip_input.c
===================================================================

slirp/ip_input.c +1 -2
@@ -392,8 +392,7 @@
 	 * into the new buffer.
 	 */
 	if (m->m_flags & M_EXT) {
-	  int delta;
-	  delta = (char *)ip - m->m_dat;
+	  int delta = (char *)q - m->m_dat;
 	  q = (struct ipasfrag *)(m->m_ext + delta);
 	}