1
0
Fork 0
forked from len0rd/rockbox

Bugfix - buf_size was being used before being initialised.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24363 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Dave Chapman 2010-01-28 11:17:01 +00:00
parent 428064016b
commit c5491758dd

View file

@ -170,17 +170,17 @@ enum plugin_status plugin_start(const void* parameter)
return PLUGIN_ERROR;
}
if (length > buf_size) {
rb->splash(HZ*2, "File too big");
return PLUGIN_ERROR;
}
/* Get the audio buffer */
buf = rb->plugin_get_audio_buffer((size_t *)&buf_size);
/* Use uncached alias for buf - equivalent to buf |= 0x40000000 */
buf += 0x10000000;
if (length > buf_size) {
rb->splash(HZ*2, "File too big");
return PLUGIN_ERROR;
}
n = rb->read(fd, buf, length);
if (n < length) {
rb->splash(HZ*2, "Cannot read file");