Mercurial > libavformat.hg
comparison asf.c @ 643:253b5292946a libavformat
various security fixes and precautionary checks
author | michael |
---|---|
date | Wed, 12 Jan 2005 00:16:25 +0000 |
parents | 2cd604e839c7 |
children | b47948262721 |
comparison
equal
deleted
inserted
replaced
642:868c41d335aa | 643:253b5292946a |
---|---|
331 value_len = get_le16(pb); | 331 value_len = get_le16(pb); |
332 if ((value_type == 0) || (value_type == 1)) // unicode or byte | 332 if ((value_type == 0) || (value_type == 1)) // unicode or byte |
333 { | 333 { |
334 value = (char *)av_mallocz(value_len); | 334 value = (char *)av_mallocz(value_len); |
335 get_str16_nolen(pb, value_len, value, value_len); | 335 get_str16_nolen(pb, value_len, value, value_len); |
336 if (strcmp(name,"WM/AlbumTitle")==0) { strcpy(s->album, value); } | 336 if (strcmp(name,"WM/AlbumTitle")==0) { pstrcpy(s->album, sizeof(s->album), value); } |
337 av_free(value); | 337 av_free(value); |
338 } | 338 } |
339 if ((value_type >= 2) || (value_type <= 5)) // boolean or DWORD or QWORD or WORD | 339 if ((value_type >= 2) || (value_type <= 5)) // boolean or DWORD or QWORD or WORD |
340 { | 340 { |
341 if (value_type==2) value_num = get_le32(pb); | 341 if (value_type==2) value_num = get_le32(pb); |