From: Gustavo Sverzut Barbieri Date: Wed, 19 Nov 2014 18:43:02 +0000 (-0200) Subject: fix buffer overflow if slen = 32. X-Git-Tag: accepted/tizen/common/20141224.100433~16 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0485002d883fbcacd9d24dbda71912e5aae53a6d;p=platform%2Fupstream%2Flightmediascanner.git fix buffer overflow if slen = 32. --- diff --git a/src/plugins/rm/rm.c b/src/plugins/rm/rm.c index d3e832d..2e5ffb3 100644 --- a/src/plugins/rm/rm.c +++ b/src/plugins/rm/rm.c @@ -325,7 +325,7 @@ _parse_mdpr_header(int fd, struct rm_info *info, bool *has_mdpr) /* mime type string */ if (read(fd, &slen, sizeof(slen)) != sizeof(slen) - || slen > 32 + || slen >= 32 || read(fd, buf, slen) != slen) goto done;