aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2012-09-04 11:22:15 +0200
committerMax Kellermann <max@duempel.org>2012-09-04 11:22:15 +0200
commit41487426f5fb19c963e5f94e8c4f791637e2da03 (patch)
treeaa49f0a74f594c1ec8b317587ef9caf6ac6356b3 /src/decoder
parent0d24250aa702eb94289890466aba9fd959df2e22 (diff)
downloadmpd-41487426f5fb19c963e5f94e8c4f791637e2da03.tar.gz
mpd-41487426f5fb19c963e5f94e8c4f791637e2da03.tar.xz
mpd-41487426f5fb19c963e5f94e8c4f791637e2da03.zip
decoder/_ogg_common: fix buffer size check
Fixes potential access to uninitialised memory.
Diffstat (limited to 'src/decoder')
-rw-r--r--src/decoder/_ogg_common.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/decoder/_ogg_common.c b/src/decoder/_ogg_common.c
index 8df97eef8..09d2712da 100644
--- a/src/decoder/_ogg_common.c
+++ b/src/decoder/_ogg_common.c
@@ -33,7 +33,7 @@ ogg_stream_type ogg_stream_type_detect(struct input_stream *inStream)
size_t r;
r = decoder_read(NULL, inStream, buf, sizeof(buf));
- if (r < 32 || memcmp(buf, "OggS", 4) != 0)
+ if (r < sizeof(buf) || memcmp(buf, "OggS", 4) != 0)
return VORBIS;
if ((memcmp(buf + 29, "FLAC", 4) == 0 &&