comparison idroq.c @ 643:253b5292946a libavformat

various security fixes and precautionary checks
author michael
date Wed, 12 Jan 2005 00:16:25 +0000
parents 0fdc96c2f2fe
children c5077fdab490
comparison
equal deleted inserted replaced
642:868c41d335aa 643:253b5292946a
194 RoQ_CHUNK_PREAMBLE_SIZE) 194 RoQ_CHUNK_PREAMBLE_SIZE)
195 return AVERROR_IO; 195 return AVERROR_IO;
196 196
197 chunk_type = LE_16(&preamble[0]); 197 chunk_type = LE_16(&preamble[0]);
198 chunk_size = LE_32(&preamble[2]); 198 chunk_size = LE_32(&preamble[2]);
199 if(chunk_size > INT_MAX)
200 return AVERROR_INVALIDDATA;
199 201
200 switch (chunk_type) { 202 switch (chunk_type) {
201 203
202 case RoQ_INFO: 204 case RoQ_INFO:
203 /* don't care about this chunk anymore */ 205 /* don't care about this chunk anymore */