Mercurial > libavcodec.hg
comparison indeo3.c @ 2422:18b8b2dcc037 libavcodec
various security fixes and precautionary checks
author | michael |
---|---|
date | Wed, 12 Jan 2005 00:16:25 +0000 |
parents | 3d4a1f8e6a27 |
children | f67b63ed036d |
comparison
equal
deleted
inserted
replaced
2421:e326490f58c4 | 2422:18b8b2dcc037 |
---|---|
194 fflags2 = *buf_pos++; | 194 fflags2 = *buf_pos++; |
195 buf_pos += 3; | 195 buf_pos += 3; |
196 hdr_height = le2me_16(*(uint16_t *)buf_pos); | 196 hdr_height = le2me_16(*(uint16_t *)buf_pos); |
197 buf_pos += 2; | 197 buf_pos += 2; |
198 hdr_width = le2me_16(*(uint16_t *)buf_pos); | 198 hdr_width = le2me_16(*(uint16_t *)buf_pos); |
199 | |
200 if(avcodec_check_dimensions(NULL, hdr_width, hdr_height)) | |
201 return -1; | |
202 | |
199 buf_pos += 2; | 203 buf_pos += 2; |
200 chroma_height = ((hdr_height >> 2) + 3) & 0x7ffc; | 204 chroma_height = ((hdr_height >> 2) + 3) & 0x7ffc; |
201 chroma_width = ((hdr_width >> 2) + 3) & 0x7ffc; | 205 chroma_width = ((hdr_width >> 2) + 3) & 0x7ffc; |
202 offs1 = le2me_32(*(uint32_t *)buf_pos); | 206 offs1 = le2me_32(*(uint32_t *)buf_pos); |
203 buf_pos += 4; | 207 buf_pos += 4; |