Skip to contentSkip to conversation

Fix SIGSEGV crash in slirp networking code

PATCH Applied Stefan Weil 2 participants 2 messages Feb 6, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix SIGSEGV crash in slirp networking code

Hello,

this patch fixes a bug which was introduced in r6288. Please apply it to Qemu trunk.

See this discussion for details:

http://lists.gnu.org/archive/cgi-bin/namazu.cgi?query=Regression+in+networking+code+(SIGSEGV)&submit=Search&idxname=qemu-devel

Regards
Stefan Weil

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

slirp/ip_input.c +1 -2
Index: trunk/slirp/ip_input.c
===================================================================
@@ -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);
 	}