[xiph-commits] r11801 - trunk/theora/lib
conrad at svn.xiph.org
conrad at svn.xiph.org
Thu Aug 24 22:47:29 PDT 2006
Author: conrad
Date: 2006-08-24 22:47:27 -0700 (Thu, 24 Aug 2006)
New Revision: 11801
Modified:
trunk/theora/lib/toplevel.c
Log:
Apply patch from Peter De Wachter: cast from long to int in
theora_unpack_comment() was crashing on AMD64; see:
http://lists.xiph.org/pipermail/theora-dev/2006-August/003067.html
Modified: trunk/theora/lib/toplevel.c
===================================================================
--- trunk/theora/lib/toplevel.c 2006-08-24 16:45:32 UTC (rev 11800)
+++ trunk/theora/lib/toplevel.c 2006-08-25 05:47:27 UTC (rev 11801)
@@ -172,7 +172,7 @@
static int _theora_unpack_comment(theora_comment *tc, oggpack_buffer *opb){
int i;
- long len;
+ long len,tmp;
_tp_readlsbint(opb,&len);
if(len<0)return(OC_BADHEADER);
@@ -180,7 +180,8 @@
_tp_readbuffer(opb,tc->vendor, len);
tc->vendor[len]='\0';
- _tp_readlsbint(opb,(long *) &tc->comments);
+ _tp_readlsbint(opb,&tmp);
+ tc->comments=tmp;
if(tc->comments<0)goto parse_err;
tc->user_comments=_ogg_calloc(tc->comments,sizeof(*tc->user_comments));
tc->comment_lengths=_ogg_calloc(tc->comments,sizeof(*tc->comment_lengths));
More information about the commits
mailing list