summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarren Salt <linux@youmustbejoking.demon.co.uk>2009-04-06 01:50:51 +0100
committerDarren Salt <linux@youmustbejoking.demon.co.uk>2009-04-06 01:50:51 +0100
commit80aa47e9de7f9d6f819d11821669ced45682e903 (patch)
tree266b7979277556a8b9522c9b27e4ce3e4c5bcd76
parenta6bc7ed17d202107208bbe637ca92d5886c3d686 (diff)
downloadxine-lib-80aa47e9de7f9d6f819d11821669ced45682e903.tar.gz
xine-lib-80aa47e9de7f9d6f819d11821669ced45682e903.tar.bz2
A trivial harmless little length test off-by-one.
-rw-r--r--src/demuxers/id3.c6
1 files 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);