summaryrefslogtreecommitdiff
path: root/apps/plugins/crypt_firmware.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/crypt_firmware.c')
-rw-r--r--apps/plugins/crypt_firmware.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/apps/plugins/crypt_firmware.c b/apps/plugins/crypt_firmware.c
index 84d7e11eaa..4dc236ef9a 100644
--- a/apps/plugins/crypt_firmware.c
+++ b/apps/plugins/crypt_firmware.c
@@ -170,17 +170,17 @@ enum plugin_status plugin_start(const void* parameter)
170 return PLUGIN_ERROR; 170 return PLUGIN_ERROR;
171 } 171 }
172 172
173 if (length > buf_size) {
174 rb->splash(HZ*2, "File too big");
175 return PLUGIN_ERROR;
176 }
177
178 /* Get the audio buffer */ 173 /* Get the audio buffer */
179 buf = rb->plugin_get_audio_buffer((size_t *)&buf_size); 174 buf = rb->plugin_get_audio_buffer((size_t *)&buf_size);
180 175
181 /* Use uncached alias for buf - equivalent to buf |= 0x40000000 */ 176 /* Use uncached alias for buf - equivalent to buf |= 0x40000000 */
182 buf += 0x10000000; 177 buf += 0x10000000;
183 178
179 if (length > buf_size) {
180 rb->splash(HZ*2, "File too big");
181 return PLUGIN_ERROR;
182 }
183
184 n = rb->read(fd, buf, length); 184 n = rb->read(fd, buf, length);
185 if (n < length) { 185 if (n < length) {
186 rb->splash(HZ*2, "Cannot read file"); 186 rb->splash(HZ*2, "Cannot read file");