summaryrefslogtreecommitdiff
path: root/apps/recorder/jpeg_load.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/recorder/jpeg_load.c')
-rwxr-xr-x[-rw-r--r--]apps/recorder/jpeg_load.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/apps/recorder/jpeg_load.c b/apps/recorder/jpeg_load.c
index 16a2f4e3a3..9ab42b7a9f 100644..100755
--- a/apps/recorder/jpeg_load.c
+++ b/apps/recorder/jpeg_load.c
@@ -2050,6 +2050,15 @@ int clip_jpeg_fd(int fd,
2050 if (!(status & DHT)) /* if no Huffman table present: */ 2050 if (!(status & DHT)) /* if no Huffman table present: */
2051 default_huff_tbl(p_jpeg); /* use default */ 2051 default_huff_tbl(p_jpeg); /* use default */
2052 fix_headers(p_jpeg); /* derive Huffman and other lookup-tables */ 2052 fix_headers(p_jpeg); /* derive Huffman and other lookup-tables */
2053
2054 /*the dim array in rockbox is limited to 2^15-1 pixels, so we cannot resize
2055 images larger than this without overflowing */
2056 if(p_jpeg->x_size > 32767 || p_jpeg->y_size > 32767)
2057 {
2058 JDEBUGF("Aborting resize of image > 32767 pixels\n");
2059 return -1;
2060 }
2061
2053 src_dim.width = p_jpeg->x_size; 2062 src_dim.width = p_jpeg->x_size;
2054 src_dim.height = p_jpeg->y_size; 2063 src_dim.height = p_jpeg->y_size;
2055 if (format & FORMAT_RESIZE) 2064 if (format & FORMAT_RESIZE)