summaryrefslogtreecommitdiffstats
path: root/apps/cuesheet.c
diff options
context:
space:
mode:
authorNicolas Pennequin <nicolas.pennequin@free.fr>2007-04-03 18:18:35 +0000
committerNicolas Pennequin <nicolas.pennequin@free.fr>2007-04-03 18:18:35 +0000
commitaf2ca4706eff6b911394e36d4a33af81f4079264 (patch)
treed77e7a9ef22985ea55758228a4e3735bcae880fd /apps/cuesheet.c
parent323d75d25f58f6e13c91fe1c42e974cc6fb54c19 (diff)
downloadrockbox-af2ca4706eff6b911394e36d4a33af81f4079264.tar.gz
rockbox-af2ca4706eff6b911394e36d4a33af81f4079264.tar.bz2
rockbox-af2ca4706eff6b911394e36d4a33af81f4079264.zip
Better check when using the plugin buffer to store a temp cuesheet.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13007 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/cuesheet.c')
-rw-r--r--apps/cuesheet.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/cuesheet.c b/apps/cuesheet.c
index fd7c7d34f1..0d96eafe0c 100644
--- a/apps/cuesheet.c
+++ b/apps/cuesheet.c
@@ -312,9 +312,9 @@ static void browse_cuesheet(struct cuesheet *cue)
bool display_cuesheet_content(char* filename)
{
- int bufsize = 0;
+ unsigned int bufsize = 0;
struct cuesheet *cue = (struct cuesheet *)plugin_get_buffer(&bufsize);
- if (!cue)
+ if (!cue || bufsize < sizeof(struct cuesheet))
return false;
if (!parse_cuesheet(filename, cue))