From 80aa47e9de7f9d6f819d11821669ced45682e903 Mon Sep 17 00:00:00 2001 From: Darren Salt Date: Mon, 6 Apr 2009 01:50:51 +0100 Subject: A trivial harmless little length test off-by-one. --- src/demuxers/id3.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/demuxers/id3.c b/src/demuxers/id3.c index 0d0ee7231..39055a852 100644 --- a/src/demuxers/id3.c +++ b/src/demuxers/id3.c @@ -276,7 +276,7 @@ static int id3v22_interp_frame(input_plugin_t *input, char *buf; int enc; const size_t bufsize = frame_header->size + 2; - if ( bufsize <= 3 ) /* frames has to be _at least_ 1 byte */ + if ( bufsize < 3 ) /* frames has to be _at least_ 1 byte */ return 0; buf = malloc(bufsize); @@ -474,7 +474,7 @@ static int id3v23_interp_frame(input_plugin_t *input, char *buf; int enc; const size_t bufsize = frame_header->size + 2; - if ( bufsize <= 3 ) /* frames has to be _at least_ 1 byte */ + if ( bufsize < 3 ) /* frames has to be _at least_ 1 byte */ return 0; buf = malloc(bufsize); @@ -729,7 +729,7 @@ static int id3v24_interp_frame(input_plugin_t *input, char *buf; int enc; const size_t bufsize = frame_header->size + 2; - if ( bufsize <= 3 ) /* frames has to be _at least_ 1 byte */ + if ( bufsize < 3 ) /* frames has to be _at least_ 1 byte */ return 0; buf = malloc(bufsize); -- cgit v1.2.3