1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00
FFmpeg/libavcodec
Herve W a949360163 * Allocating 16 bytes more for the MEMALIGN_HACK is enough. There's no
need for 1 more extra byte.

* Checking whether the to be allocated size is larger than INT_MAX,
doesn't assure that size+16 bytes for the MEMALIGN_HACK isn't larger
than INT_MAX.

* malloc might return NULL. Checking for it before using that pointer
seems like a good idea.
Patch by Herve W. H PPP O PPP W PPP aka PPP V+ffmpeg AH gmail PPP com
Original thread:
Date: Jun 29, 2006 1:21 PM
Subject: [Ffmpeg-devel] [PATCH] minor improvements to libavcodec/mem.c

Originally committed as revision 5559 to svn://svn.ffmpeg.org/ffmpeg/trunk
2006-06-30 08:00:01 +00:00
..
alpha Change license header to LGPL for consistency. 2006-02-17 19:48:11 +00:00
armv4l Update licensing information: The FSF changed postal address. 2006-01-12 22:43:26 +00:00
i386 missmatch control for mpeg2 intra dequantization if bitexact=1 2006-04-28 17:03:52 +00:00
liba52 libavcodec/libpostproc ---> libpostproc 2006-06-01 21:37:48 +00:00
mlib Update licensing information: The FSF changed postal address. 2006-01-12 22:43:26 +00:00
ppc Make gcc-3 happy again, thanks to Olivier Castan <castan.o@free.fr> for pointing the issue 2006-06-20 10:35:30 +00:00
ps2 Update licensing information: The FSF changed postal address. 2006-01-12 22:43:26 +00:00
sh4 Update licensing information: The FSF changed postal address. 2006-01-12 22:43:26 +00:00
sparc Update licensing information: The FSF changed postal address. 2006-01-12 22:43:26 +00:00
4xm.c sanity checks, some might have been exploitable ... 2006-05-13 10:45:26 +00:00
8bps.c Update licensing information: The FSF changed postal address. 2006-01-12 22:43:26 +00:00
a52dec.c native ac3 parser 2006-01-21 18:19:47 +00:00
aasc.c Update licensing information: The FSF changed postal address. 2006-01-12 22:43:26 +00:00
ac3.h Update licensing information: The FSF changed postal address. 2006-01-12 22:43:26 +00:00
ac3dec.c Update licensing information: The FSF changed postal address. 2006-01-12 22:43:26 +00:00
ac3enc.c Revert bad ac3enc commit, the commited code was bigger and slower. 2006-04-28 14:19:11 +00:00
ac3tab.h Revert bad ac3enc commit, the commited code was bigger and slower. 2006-04-28 14:19:11 +00:00
adpcm.c ADPCM: trellis quantization 2006-06-03 19:04:56 +00:00
adx.c cleanup patch from Diego Pettenò <flameeyes@gentoo.org> 2006-06-25 17:37:12 +00:00
alac.c Add const to (mostly) char* and make some functions static, which aren't used 2006-06-18 11:33:14 +00:00
allcodecs.c Rename VC9 to VC1 as there is no such thing as VC9 2006-06-27 02:55:54 +00:00
amr.c Update licensing information: The FSF changed postal address. 2006-01-12 22:43:26 +00:00
apiexample.c COSMETICS: Remove all trailing whitespace. 2005-12-17 18:14:38 +00:00
asv1.c add assert to clarify that we know what we are doing 2006-03-10 19:10:46 +00:00
avcodec.h Rename VC9 to VC1 as there is no such thing as VC9 2006-06-27 02:55:54 +00:00
avs.c complete AVS playback system (from Creature Shock computer game), 2006-02-17 03:17:42 +00:00
beosthread.c Update licensing information: The FSF changed postal address. 2006-01-12 22:43:26 +00:00
bitstream.c Update licensing information: The FSF changed postal address. 2006-01-12 22:43:26 +00:00
bitstream.h MIPS doesn't like unaligned accesses 2006-06-12 21:34:43 +00:00
bmp.c Update licensing information: The FSF changed postal address. 2006-01-12 22:43:26 +00:00
cabac.c Update licensing information: The FSF changed postal address. 2006-01-12 22:43:26 +00:00
cabac.h don't force asserts in release builds. 2% faster h264. 2006-04-29 00:43:15 +00:00
cinepak.c Update licensing information: The FSF changed postal address. 2006-01-12 22:43:26 +00:00
cljr.c Update licensing information: The FSF changed postal address. 2006-01-12 22:43:26 +00:00
cook.c sanity checks, some might have been exploitable ... 2006-05-13 10:45:26 +00:00
cookdata.h Update licensing information: The FSF changed postal address. 2006-01-12 22:43:26 +00:00
cscd.c faster copy functions for lzo decoder that also need padding 2006-01-22 19:10:12 +00:00
cyuv.c Update licensing information: The FSF changed postal address. 2006-01-12 22:43:26 +00:00
dct-test.c COSMETICS: tabs --> spaces, some prettyprinting 2005-12-22 01:10:11 +00:00
dpcm.c Update licensing information: The FSF changed postal address. 2006-01-12 22:43:26 +00:00
dsputil.c Disable w53 and w97 cmp methods when snow encoder is disabled 2006-06-30 07:50:30 +00:00
dsputil.h Remove unused and unsupported Cyrix's "Extended MMX", 2006-04-28 07:46:13 +00:00
dtsdec.c dtsdec.c copies one input packet at a time to a (static) buffer of size 2006-04-20 19:23:57 +00:00
dv.c I still don't think this should be here. Note: without this code DV encoder 2006-03-06 09:54:09 +00:00
dvbsub.c Update licensing information: The FSF changed postal address. 2006-01-12 22:43:26 +00:00
dvbsubdec.c Update licensing information: The FSF changed postal address. 2006-01-12 22:43:26 +00:00
dvdata.h DVCPRO50 support. 2006-03-06 08:54:33 +00:00
dvdsub.c add static keyword to some functions 2006-01-30 23:33:19 +00:00
dvdsubenc.c Update licensing information: The FSF changed postal address. 2006-01-12 22:43:26 +00:00
error_resilience.c Update licensing information: The FSF changed postal address. 2006-01-12 22:43:26 +00:00
eval.c Update licensing information: The FSF changed postal address. 2006-01-12 22:43:26 +00:00
faac.c create adts stream if CODEC_FLAG_GLOBAL_HEADER not set 2006-02-08 01:10:07 +00:00
faad.c Make faac_decode_frame return -1 on error and not 0 which avoids 2006-03-05 12:32:24 +00:00
faandct.c Update licensing information: The FSF changed postal address. 2006-01-12 22:43:26 +00:00
faandct.h Update licensing information: The FSF changed postal address. 2006-01-12 22:43:26 +00:00
fdctref.c COSMETICS: tabs --> spaces, some prettyprinting 2005-12-22 01:10:11 +00:00
fft-test.c COSMETICS: Remove all trailing whitespace. 2005-12-17 18:14:38 +00:00
fft.c 3DNow! & Extended 3DNow! versions of FFT 2006-03-08 04:13:55 +00:00
ffv1.c memory leak. 2006-04-28 23:16:42 +00:00
flac.c fix 24bit flac support, revised from Thibaut Mattern <thibaut.mattern@gmail.com> 2006-06-21 00:21:26 +00:00
flacenc.c flacenc - rice param search patch by (Justin Ruggles jruggle earthlink net 2006-06-27 21:01:21 +00:00
flashsv.c Flash Screen Video decoder (fourcc:FSV1) 2006-06-01 07:31:59 +00:00
flicvideo.c make some functions static (patch by Dieter < freebsd at sopwith.solgatos.com >) 2006-01-28 16:05:06 +00:00
fraps.c Update licensing information: The FSF changed postal address. 2006-01-12 22:43:26 +00:00
g726.c Update licensing information: The FSF changed postal address. 2006-01-12 22:43:26 +00:00
golomb.c Update licensing information: The FSF changed postal address. 2006-01-12 22:43:26 +00:00
golomb.h first rudimentary version of (Justin Ruggles jruggle earthlink net) flac encoder 2006-06-24 10:20:15 +00:00
h261.c cbp must be >0 here or we are in troubble 2006-05-29 16:30:56 +00:00
h261data.h
h263.c add outcommented chunk of code to handle stuffing MBs at the end of slices (IMHO the standard doesnt allow this and there are no real world files which need it) 2006-05-08 13:44:54 +00:00
h263data.h out of array read fix 2006-03-10 21:20:49 +00:00
h263dec.c Fix initialization of vc1_decoder (the same as wmv3_decoder). 2006-06-29 11:17:50 +00:00
h264.c h264: accept rbsp_trailing longer than 1 byte 2006-06-12 09:30:17 +00:00
h264data.h h264: MBAFF interlaced decoding 2006-05-28 22:44:14 +00:00
h264idct.c h264: special case dc-only idct. ~1% faster overall 2006-02-10 06:55:25 +00:00
huffyuv.c ffv1 and ffvhuff havnt changed since a long time and noone proposed any 2006-04-14 10:37:40 +00:00
idcinvideo.c Update licensing information: The FSF changed postal address. 2006-01-12 22:43:26 +00:00
imgconvert_template.h Update licensing information: The FSF changed postal address. 2006-01-12 22:43:26 +00:00
imgconvert.c make "size" variable in avpicture_alloc signed, since avpicture_get_size 2006-04-19 19:51:56 +00:00
imgresample.c Introduce swscale interface in libavcodec 2006-04-04 12:35:55 +00:00
indeo2.c Update licensing information: The FSF changed postal address. 2006-01-12 22:43:26 +00:00
indeo2data.h COSMETICS: Remove all trailing whitespace. 2005-12-17 18:14:38 +00:00
indeo3.c Update licensing information: The FSF changed postal address. 2006-01-12 22:43:26 +00:00
indeo3data.h COSMETICS: tabs --> spaces, some prettyprinting 2005-12-22 01:10:11 +00:00
internal.h - Add new file internal.h for common internal-use-only functions. 2006-03-30 04:33:05 +00:00
interplayvideo.c Update licensing information: The FSF changed postal address. 2006-01-12 22:43:26 +00:00
jfdctfst.c COSMETICS: tabs --> spaces, some prettyprinting 2005-12-22 01:10:11 +00:00
jfdctint.c COSMETICS: tabs --> spaces, some prettyprinting 2005-12-22 01:10:11 +00:00
jpeg_ls.c list of supported pix_fmts 2006-02-02 02:36:27 +00:00
jrevdct.c COSMETICS: tabs --> spaces, some prettyprinting 2005-12-22 01:10:11 +00:00
kmvc.c Palette support for newer KMVC 2006-05-31 04:52:02 +00:00
lcl.c Update licensing information: The FSF changed postal address. 2006-01-12 22:43:26 +00:00
libgsm.c Update licensing information: The FSF changed postal address. 2006-01-12 22:43:26 +00:00
loco.c Update licensing information: The FSF changed postal address. 2006-01-12 22:43:26 +00:00
lzo.c faster copy functions for lzo decoder that also need padding 2006-01-22 19:10:12 +00:00
lzo.h faster copy functions for lzo decoder that also need padding 2006-01-22 19:10:12 +00:00
mace.c Update licensing information: The FSF changed postal address. 2006-01-12 22:43:26 +00:00
Makefile Rename VC9 to VC1 as there is no such thing as VC9 2006-06-27 02:55:54 +00:00
mdct.c Update licensing information: The FSF changed postal address. 2006-01-12 22:43:26 +00:00
mdec.c MSVC-compatible __align8/__align16 declaration 2006-02-05 13:35:17 +00:00
mem.c * Allocating 16 bytes more for the MEMALIGN_HACK is enough. There's no 2006-06-30 08:00:01 +00:00
mjpeg.c remove useless code 2006-03-31 18:22:35 +00:00
mmvideo.c complete American Laser Games MM playback system, courtesy of Peter Ross 2006-02-12 06:49:40 +00:00
motion_est_template.c make zero motion vector threshold user setable 2006-05-07 11:48:07 +00:00
motion_est.c asserts to check if assumed conditions really are true 2006-03-10 22:00:36 +00:00
motion_test.c COSMETICS: Remove all trailing whitespace. 2005-12-17 18:14:38 +00:00
mp3lameaudio.c Update licensing information: The FSF changed postal address. 2006-01-12 22:43:26 +00:00
mpeg4data.h warning fixes by Luca Abeni, lucabe72 ##@## email ##.## it 2006-01-25 22:10:13 +00:00
mpeg12.c MPEG-2 4:2:2 encoding support 2006-05-16 15:19:54 +00:00
mpeg12data.h COSMETICS: tabs --> spaces, some prettyprinting 2005-12-22 01:10:11 +00:00
mpegaudio.c Update licensing information: The FSF changed postal address. 2006-01-12 22:43:26 +00:00
mpegaudio.h COSMETICS: tabs --> spaces, some prettyprinting 2005-12-22 01:10:11 +00:00
mpegaudiodec.c (f)printf --> av_log conversion 2006-03-08 11:43:10 +00:00
mpegaudiodectab.h COSMETICS: Remove all trailing whitespace. 2005-12-17 18:14:38 +00:00
mpegaudiotab.h COSMETICS: Remove all trailing whitespace. 2005-12-17 18:14:38 +00:00
mpegvideo.c Make B-frame reduction sensitivity by b_strategy/vb_strategy = 1 2006-06-03 06:26:04 +00:00
mpegvideo.h fix mbd bits bug, finally 2006-05-26 15:44:29 +00:00
msmpeg4.c Rename VC9 to VC1 as there is no such thing as VC9 2006-06-27 02:55:54 +00:00
msmpeg4data.h COSMETICS: Remove all trailing whitespace. 2005-12-17 18:14:38 +00:00
msrle.c Update licensing information: The FSF changed postal address. 2006-01-12 22:43:26 +00:00
msvideo1.c Update licensing information: The FSF changed postal address. 2006-01-12 22:43:26 +00:00
nuv.c NuppelVideo/MythTVVideo support, including rtjpeg decoder 2006-03-27 22:22:50 +00:00
oggtheora.c COSMETICS: tabs --> spaces, some prettyprinting 2005-12-22 01:10:11 +00:00
oggvorbis.c Implement audio cutoff frequency to the vorbis encoder. 2006-01-21 17:09:23 +00:00
opt.c Give a hint about what is the expected the data type of command line options. 2006-02-23 10:07:41 +00:00
opt.h COSMETICS: Remove all trailing whitespace. 2005-12-17 18:14:38 +00:00
os2thread.c os2 thread, network and freetype2 support by (Paul Smedley | paulat a t smedleydot d o t info) 2006-02-02 13:07:30 +00:00
parser.c The AAC frame header uses 13 bits for the frame size, so the buffer should 2006-06-16 20:41:33 +00:00
pcm.c Update licensing information: The FSF changed postal address. 2006-01-12 22:43:26 +00:00
png.c Add const to (mostly) char* and make some functions static, which aren't used 2006-06-18 11:33:14 +00:00
pnm.c Update licensing information: The FSF changed postal address. 2006-01-12 22:43:26 +00:00
pthread.c Update licensing information: The FSF changed postal address. 2006-01-12 22:43:26 +00:00
qdm2.c Fixed a possible bug, checked against the assembly. 2006-06-02 07:50:12 +00:00
qdm2data.h Update licensing information: The FSF changed postal address. 2006-01-12 22:43:26 +00:00
qdrw.c Update licensing information: The FSF changed postal address. 2006-01-12 22:43:26 +00:00
qpeg.c Update licensing information: The FSF changed postal address. 2006-01-12 22:43:26 +00:00
qtrle.c Update licensing information: The FSF changed postal address. 2006-01-12 22:43:26 +00:00
ra144.c Update licensing information: The FSF changed postal address. 2006-01-12 22:43:26 +00:00
ra144.h Update licensing information: The FSF changed postal address. 2006-01-12 22:43:26 +00:00
ra288.c Update licensing information: The FSF changed postal address. 2006-01-12 22:43:26 +00:00
ra288.h Update licensing information: The FSF changed postal address. 2006-01-12 22:43:26 +00:00
rangecoder.c fixing out of array access (only cosmetic, this should never have had a end user vissible effect) 2006-03-10 19:42:51 +00:00
rangecoder.h Update licensing information: The FSF changed postal address. 2006-01-12 22:43:26 +00:00
ratecontrol.c fabs is better then abs for floats ... 2006-05-29 16:50:37 +00:00
raw.c add quicktime uncompressed 8bit 4:2:2 support 2006-05-14 14:21:06 +00:00
resample2.c Add const to (mostly) char* and make some functions static, which aren't used 2006-06-18 11:33:14 +00:00
resample.c Update licensing information: The FSF changed postal address. 2006-01-12 22:43:26 +00:00
roqvideo.c Update licensing information: The FSF changed postal address. 2006-01-12 22:43:26 +00:00
rpza.c Update licensing information: The FSF changed postal address. 2006-01-12 22:43:26 +00:00
rtjpeg.c NuppelVideo/MythTVVideo support, including rtjpeg decoder 2006-03-27 22:22:50 +00:00
rtjpeg.h NuppelVideo/MythTVVideo support, including rtjpeg decoder 2006-03-27 22:22:50 +00:00
rv10.c Fix SIGSEGV in rv10-null-pointer-500k.rm. 2006-04-15 12:52:01 +00:00
shorten.c sanity checks, some might have been exploitable ... 2006-05-13 10:45:26 +00:00
simple_idct.c Update licensing information: The FSF changed postal address. 2006-01-12 22:43:26 +00:00
simple_idct.h Update licensing information: The FSF changed postal address. 2006-01-12 22:43:26 +00:00
smacker.c Now MPlayer should understand Smacker audio and video codecs. 2006-05-17 03:03:53 +00:00
smc.c Update licensing information: The FSF changed postal address. 2006-01-12 22:43:26 +00:00
snow.c support doing motion estimation and compensation without any residual transform or coding 2006-06-04 21:54:58 +00:00
snow.h Snow: cosmetics 2006-05-30 19:40:28 +00:00
sonic.c Update licensing information: The FSF changed postal address. 2006-01-12 22:43:26 +00:00
sp5x.h Update licensing information: The FSF changed postal address. 2006-01-12 22:43:26 +00:00
svq1_cb.h out of array read fix 2006-03-10 20:58:42 +00:00
svq1_vlc.h COSMETICS: Remove all trailing whitespace. 2005-12-17 18:14:38 +00:00
svq1.c Update licensing information: The FSF changed postal address. 2006-01-12 22:43:26 +00:00
svq3.c Update licensing information: The FSF changed postal address. 2006-01-12 22:43:26 +00:00
swscale.h Introduce swscale interface in libavcodec 2006-04-04 12:35:55 +00:00
truemotion1.c Update licensing information: The FSF changed postal address. 2006-01-12 22:43:26 +00:00
truemotion1data.h Two tables in truemotion1data.h were slightly different from VpVision 2005-11-05 19:03:07 +00:00
truemotion2.c Update licensing information: The FSF changed postal address. 2006-01-12 22:43:26 +00:00
truespeech_data.h Make all tables static const. 2006-01-04 03:01:05 +00:00
truespeech.c Add const to (mostly) char* and make some functions static, which aren't used 2006-06-18 11:33:14 +00:00
tscc.c make TSCC endian-safe, PPC testing courtesy of Diego B. 2006-02-12 16:56:06 +00:00
tta.c sanity checks, some might have been exploitable ... 2006-05-13 10:45:26 +00:00
ulti_cb.h adding a few const 2005-06-01 21:19:00 +00:00
ulti.c Update licensing information: The FSF changed postal address. 2006-01-12 22:43:26 +00:00
utils.c Disable w53 and w97 cmp methods when snow encoder is disabled 2006-06-30 07:50:30 +00:00
vc1.c Slightly reworked MC code, it gives better picture. 2006-06-30 03:19:31 +00:00
vc1acdata.h VC-1 decoder with I-frames support and partial P-frames decoding 2006-06-27 03:11:51 +00:00
vc1data.h VC-1 decoder with I-frames support and partial P-frames decoding 2006-06-27 03:11:51 +00:00
vcr1.c Update licensing information: The FSF changed postal address. 2006-01-12 22:43:26 +00:00
vmdav.c 16-bit DPCM and stereo support for Sierra VMD 2006-03-11 04:26:55 +00:00
vorbis.c Cosmetics. Add the defines needed for debug output. 2006-05-11 00:28:30 +00:00
vorbis.h Correct the relation between floors of type 0 and block sizes. 2006-02-05 10:16:20 +00:00
vp3.c kill some warnings 2006-02-25 22:41:31 +00:00
vp3data.h COSMETICS: Remove all trailing whitespace. 2005-12-17 18:14:38 +00:00
vp3dsp.c Update licensing information: The FSF changed postal address. 2006-01-12 22:43:26 +00:00
vqavideo.c Update licensing information: The FSF changed postal address. 2006-01-12 22:43:26 +00:00
w32thread.c Update licensing information: The FSF changed postal address. 2006-01-12 22:43:26 +00:00
wmadata.h COSMETICS: Remove all trailing whitespace. 2005-12-17 18:14:38 +00:00
wmadec.c Do not read full byte when less than 8 bits are still to be read. 2006-06-27 12:13:01 +00:00
wmv2.c MSVC-compatible __align8/__align16 declaration 2006-02-05 13:35:17 +00:00
wnv1.c Update licensing information: The FSF changed postal address. 2006-01-12 22:43:26 +00:00
ws-snd1.c Update licensing information: The FSF changed postal address. 2006-01-12 22:43:26 +00:00
x264.c pass noise reduction option to x264 2006-02-20 19:01:29 +00:00
xan.c Update licensing information: The FSF changed postal address. 2006-01-12 22:43:26 +00:00
xl.c Update licensing information: The FSF changed postal address. 2006-01-12 22:43:26 +00:00
xvid_rc.c - Add new file internal.h for common internal-use-only functions. 2006-03-30 04:33:05 +00:00
xvidff.c 10l to whoever wrote this 2006-06-15 09:20:31 +00:00
xvmcvideo.c Update licensing information: The FSF changed postal address. 2006-01-12 22:43:26 +00:00
zmbv.c ZMBV 15-/16-/32-bit decoding. 24-bit mode is disabled because it's not 2006-02-20 23:22:02 +00:00