OSDN Git Service
(root)
/
coroid
/
ffmpeg_saccubus.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0baf651
)
wav: init st to NULL to avoid a false-positive warning.
author
Clément Bœsch
<ubitux@gmail.com>
Thu, 1 Sep 2011 18:06:05 +0000
(20:06 +0200)
committer
Clément Bœsch
<ubitux@gmail.com>
Thu, 1 Sep 2011 18:23:40 +0000
(20:23 +0200)
If st is NULL, it means no 'fmt ' tag is found, but 'data' tag (which
needs a previous 'fmt ' tag to be parsed correctly and st initialized)
check will make sure st is never dereferenced in that case.
libavformat/wav.c
patch
|
blob
|
history
diff --git
a/libavformat/wav.c
b/libavformat/wav.c
index
1ae9413
..
327d891
100644
(file)
--- a/
libavformat/wav.c
+++ b/
libavformat/wav.c
@@
-387,7
+387,7
@@
static int wav_read_header(AVFormatContext *s,
int rf64;
unsigned int tag;
AVIOContext *pb = s->pb;
- AVStream *st;
+ AVStream *st
= NULL
;
WAVContext *wav = s->priv_data;
int ret, got_fmt = 0;
int64_t next_tag_ofs, data_ofs = -1;