aboutsummaryrefslogtreecommitdiffstats
path: root/libavresample
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2013-12-16 18:20:41 +0100
committerAnton Khirnov <anton@khirnov.net>2014-01-03 16:42:23 +0100
commit3d95d27376e59de14f984e7a22a52e066d85df35 (patch)
tree487b2241c7d00bafcfa3fc9136561a11702b039b /libavresample
parent58312b2472d3a44d7458865c459d59ef2e02bf1a (diff)
downloadffmpeg-3d95d27376e59de14f984e7a22a52e066d85df35.tar.gz
audio_mix: initialize the data pointers to NULL
This should make it easier to catch problems where some of those pointers are used uninitialized, since reading from NULL should always crash, while random numbers from stack can turn out to be valid pointers, so random memory may be silently overwritten.
Diffstat (limited to 'libavresample')
-rw-r--r--libavresample/audio_mix.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavresample/audio_mix.c b/libavresample/audio_mix.c
index 073609e7ee..765bc73441 100644
--- a/libavresample/audio_mix.c
+++ b/libavresample/audio_mix.c
@@ -447,7 +447,7 @@ int ff_audio_mix(AudioMix *am, AudioData *src)
if (am->in_matrix_channels && am->out_matrix_channels) {
uint8_t **data;
- uint8_t *data0[AVRESAMPLE_MAX_CHANNELS];
+ uint8_t *data0[AVRESAMPLE_MAX_CHANNELS] = { NULL };
if (am->out_matrix_channels < am->out_channels ||
am->in_matrix_channels < am->in_channels) {