diff options
author | Max Kellermann <max@duempel.org> | 2012-09-04 11:22:15 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2012-09-04 11:22:15 +0200 |
commit | 41487426f5fb19c963e5f94e8c4f791637e2da03 (patch) | |
tree | aa49f0a74f594c1ec8b317587ef9caf6ac6356b3 /src/decoder/_ogg_common.c | |
parent | 0d24250aa702eb94289890466aba9fd959df2e22 (diff) | |
download | mpd-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/_ogg_common.c')
-rw-r--r-- | src/decoder/_ogg_common.c | 2 |
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 && |