annotate mpegaudiodecheader.h @ 9523:3045aef3405c libavcodec

Fix a possibly exploitable buffer overflow.
author michael
date Tue, 21 Apr 2009 12:00:39 +0000
parents e9d9d946f213
children 7dd2a45249a9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5050
a5f6fbc9fa66 loosen dependencies over mpegaudiodec
aurel
parents:
diff changeset
1 /*
a5f6fbc9fa66 loosen dependencies over mpegaudiodec
aurel
parents:
diff changeset
2 * MPEG Audio header decoder
8629
04423b2f6e0b cosmetics: Remove pointless period after copyright statement non-sentences.
diego
parents: 7760
diff changeset
3 * Copyright (c) 2001, 2002 Fabrice Bellard
5050
a5f6fbc9fa66 loosen dependencies over mpegaudiodec
aurel
parents:
diff changeset
4 *
a5f6fbc9fa66 loosen dependencies over mpegaudiodec
aurel
parents:
diff changeset
5 * This file is part of FFmpeg.
a5f6fbc9fa66 loosen dependencies over mpegaudiodec
aurel
parents:
diff changeset
6 *
a5f6fbc9fa66 loosen dependencies over mpegaudiodec
aurel
parents:
diff changeset
7 * FFmpeg is free software; you can redistribute it and/or
a5f6fbc9fa66 loosen dependencies over mpegaudiodec
aurel
parents:
diff changeset
8 * modify it under the terms of the GNU Lesser General Public
a5f6fbc9fa66 loosen dependencies over mpegaudiodec
aurel
parents:
diff changeset
9 * License as published by the Free Software Foundation; either
a5f6fbc9fa66 loosen dependencies over mpegaudiodec
aurel
parents:
diff changeset
10 * version 2.1 of the License, or (at your option) any later version.
a5f6fbc9fa66 loosen dependencies over mpegaudiodec
aurel
parents:
diff changeset
11 *
a5f6fbc9fa66 loosen dependencies over mpegaudiodec
aurel
parents:
diff changeset
12 * FFmpeg is distributed in the hope that it will be useful,
a5f6fbc9fa66 loosen dependencies over mpegaudiodec
aurel
parents:
diff changeset
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
a5f6fbc9fa66 loosen dependencies over mpegaudiodec
aurel
parents:
diff changeset
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
a5f6fbc9fa66 loosen dependencies over mpegaudiodec
aurel
parents:
diff changeset
15 * Lesser General Public License for more details.
a5f6fbc9fa66 loosen dependencies over mpegaudiodec
aurel
parents:
diff changeset
16 *
a5f6fbc9fa66 loosen dependencies over mpegaudiodec
aurel
parents:
diff changeset
17 * You should have received a copy of the GNU Lesser General Public
a5f6fbc9fa66 loosen dependencies over mpegaudiodec
aurel
parents:
diff changeset
18 * License along with FFmpeg; if not, write to the Free Software
a5f6fbc9fa66 loosen dependencies over mpegaudiodec
aurel
parents:
diff changeset
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
a5f6fbc9fa66 loosen dependencies over mpegaudiodec
aurel
parents:
diff changeset
20 */
a5f6fbc9fa66 loosen dependencies over mpegaudiodec
aurel
parents:
diff changeset
21
a5f6fbc9fa66 loosen dependencies over mpegaudiodec
aurel
parents:
diff changeset
22 /**
8718
e9d9d946f213 Use full internal pathname in doxygen @file directives.
diego
parents: 8641
diff changeset
23 * @file libavcodec/mpegaudiodecheader.c
5050
a5f6fbc9fa66 loosen dependencies over mpegaudiodec
aurel
parents:
diff changeset
24 * MPEG Audio header decoder.
a5f6fbc9fa66 loosen dependencies over mpegaudiodec
aurel
parents:
diff changeset
25 */
a5f6fbc9fa66 loosen dependencies over mpegaudiodec
aurel
parents:
diff changeset
26
7760
c4a4495715dd Globally rename the header inclusion guard names.
stefano
parents: 6763
diff changeset
27 #ifndef AVCODEC_MPEGAUDIODECHEADER_H
c4a4495715dd Globally rename the header inclusion guard names.
stefano
parents: 6763
diff changeset
28 #define AVCODEC_MPEGAUDIODECHEADER_H
5050
a5f6fbc9fa66 loosen dependencies over mpegaudiodec
aurel
parents:
diff changeset
29
6763
f7cbb7733146 Use full path for #includes from another directory.
diego
parents: 5830
diff changeset
30 #include "libavutil/common.h"
5050
a5f6fbc9fa66 loosen dependencies over mpegaudiodec
aurel
parents:
diff changeset
31 #include "mpegaudio.h"
a5f6fbc9fa66 loosen dependencies over mpegaudiodec
aurel
parents:
diff changeset
32
a5f6fbc9fa66 loosen dependencies over mpegaudiodec
aurel
parents:
diff changeset
33
a5f6fbc9fa66 loosen dependencies over mpegaudiodec
aurel
parents:
diff changeset
34 /* header decoding. MUST check the header before because no
a5f6fbc9fa66 loosen dependencies over mpegaudiodec
aurel
parents:
diff changeset
35 consistency check is done there. Return 1 if free format found and
a5f6fbc9fa66 loosen dependencies over mpegaudiodec
aurel
parents:
diff changeset
36 that the frame size must be computed externally */
8641
54e2916c25a5 Avoid allocating MPADecodeContext on stack.
andoma
parents: 8629
diff changeset
37 int ff_mpegaudio_decode_header(MPADecodeHeader *s, uint32_t header);
5050
a5f6fbc9fa66 loosen dependencies over mpegaudiodec
aurel
parents:
diff changeset
38
7760
c4a4495715dd Globally rename the header inclusion guard names.
stefano
parents: 6763
diff changeset
39 #endif /* AVCODEC_MPEGAUDIODECHEADER_H */