diff options
Diffstat (limited to 'apps/recorder/bmp.c')
-rw-r--r-- | apps/recorder/bmp.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/apps/recorder/bmp.c b/apps/recorder/bmp.c index eef425fb25..4968d6221a 100644 --- a/apps/recorder/bmp.c +++ b/apps/recorder/bmp.c | |||
@@ -460,6 +460,7 @@ int read_bmp_fd(int fd, | |||
460 | int read_width; | 460 | int read_width; |
461 | int depth, numcolors, compression, totalsize; | 461 | int depth, numcolors, compression, totalsize; |
462 | int ret; | 462 | int ret; |
463 | bool return_size = format & FORMAT_RETURN_SIZE; | ||
463 | 464 | ||
464 | unsigned char *bitmap = bm->data; | 465 | unsigned char *bitmap = bm->data; |
465 | struct uint8_rgb palette[256]; | 466 | struct uint8_rgb palette[256]; |
@@ -595,6 +596,9 @@ int read_bmp_fd(int fd, | |||
595 | else | 596 | else |
596 | totalsize = BM_SIZE(bm->width,bm->height,format,remote); | 597 | totalsize = BM_SIZE(bm->width,bm->height,format,remote); |
597 | 598 | ||
599 | if(return_size) | ||
600 | return totalsize; | ||
601 | |||
598 | /* Check if this fits the buffer */ | 602 | /* Check if this fits the buffer */ |
599 | if (totalsize > maxsize) { | 603 | if (totalsize > maxsize) { |
600 | DEBUGF("read_bmp_fd: Bitmap too large for buffer: " | 604 | DEBUGF("read_bmp_fd: Bitmap too large for buffer: " |