Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 May 2000 22:00:39 +0900 (JST)
From:      sakane@kame.net
To:        erich@FreeBSD.org
Cc:        ports@FreeBSD.org
Subject:   mpeg_encode 1.5b dumps core.
Message-ID:  <200005121300.WAA20056@tanu.tanu.org>

next in thread | raw e-mail | index | archive | help
segmentation fault occur to mpeg_encode at least on my environment
because it does not initialize frameTable.

	Program received signal SIGSEGV, Segmentation fault.
	0x805e557 in ComputeFrameTable () at frametype.c:350
	350             ptr->next = &(frameTable[table_size]);
	(gdb) info st
	#0  0x805e557 in ComputeFrameTable () at frametype.c:350
	#1  0x807e9c9 in main (argc=2, argv=0xbfbfd380) at main.c:428
	#2  0x804925d in _start ()

The following patch can be fixed this problem.

Regards,

/Shoichi `NE' Sakane @ KAME project/

*** frametype.c.ORIG	Sun Apr 16 22:28:15 2000
--- frametype.c	Sun Apr 16 23:19:25 2000
***************
*** 278,283 ****
--- 278,284 ----
      }
  
      frameTable = (FrameTable *) malloc((1+table_size)*sizeof(FrameTable));
+     memset(frameTable, 0, (1+table_size)*sizeof(FrameTable));
      ERRCHK(frameTable, "malloc");
  
      lastI = NULL;


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200005121300.WAA20056>