Mercurial > mplayer.hg
diff loader/vfl.c @ 1096:bf973bffe240
some possible buffer overflow places fixed
author | al3x |
---|---|
date | Mon, 11 Jun 2001 12:47:48 +0000 |
parents | d751f549f29f |
children | 200c03672178 |
line wrap: on
line diff
--- a/loader/vfl.c Mon Jun 11 12:41:53 2001 +0000 +++ b/loader/vfl.c Mon Jun 11 12:47:48 2001 +0000 @@ -121,7 +121,7 @@ memcpy(type,&fccType,4);type[4]=0; memcpy(handler,&fccHandler,4);handler[4]=0; - sprintf(codecname,"%s.%s",type,handler); + snprintf(codecname,20,"%s.%s",type,handler); /* Well, lParam2 is in fact a LPVIDEO_OPEN_PARMS, but it has the * same layout as ICOPEN @@ -136,7 +136,7 @@ /* if (!hdrv) { if (!strcasecmp(type,"vids")) { - sprintf(codecname,"vidc.%s",handler); + snprintf(codecname,20,"vidc.%s",handler); fccType = mmioFOURCC('v','i','d','c'); } // hdrv=OpenDriverA(codecname,"drivers32",(long)&icopen);