comparison 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
comparison
equal deleted inserted replaced
1095:c1daff266657 1096:bf973bffe240
119 WINE_HIC *whic; 119 WINE_HIC *whic;
120 120
121 memcpy(type,&fccType,4);type[4]=0; 121 memcpy(type,&fccType,4);type[4]=0;
122 memcpy(handler,&fccHandler,4);handler[4]=0; 122 memcpy(handler,&fccHandler,4);handler[4]=0;
123 123
124 sprintf(codecname,"%s.%s",type,handler); 124 snprintf(codecname,20,"%s.%s",type,handler);
125 125
126 /* Well, lParam2 is in fact a LPVIDEO_OPEN_PARMS, but it has the 126 /* Well, lParam2 is in fact a LPVIDEO_OPEN_PARMS, but it has the
127 * same layout as ICOPEN 127 * same layout as ICOPEN
128 */ 128 */
129 icopen.fccType = fccType; 129 icopen.fccType = fccType;
134 // hdrv=OpenDriverA(codecname,"drivers32",(long)&icopen); 134 // hdrv=OpenDriverA(codecname,"drivers32",(long)&icopen);
135 hdrv=OpenDriverA((long)&icopen); 135 hdrv=OpenDriverA((long)&icopen);
136 /* 136 /*
137 if (!hdrv) { 137 if (!hdrv) {
138 if (!strcasecmp(type,"vids")) { 138 if (!strcasecmp(type,"vids")) {
139 sprintf(codecname,"vidc.%s",handler); 139 snprintf(codecname,20,"vidc.%s",handler);
140 fccType = mmioFOURCC('v','i','d','c'); 140 fccType = mmioFOURCC('v','i','d','c');
141 } 141 }
142 // hdrv=OpenDriverA(codecname,"drivers32",(long)&icopen); 142 // hdrv=OpenDriverA(codecname,"drivers32",(long)&icopen);
143 hdrv=OpenDriverA((long)&icopen); 143 hdrv=OpenDriverA((long)&icopen);
144 */ 144 */