diff options
Diffstat (limited to 'apps/recorder')
-rw-r--r-- | apps/recorder/jpeg_load.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/recorder/jpeg_load.c b/apps/recorder/jpeg_load.c index 5b287aff75..34d543b56e 100644 --- a/apps/recorder/jpeg_load.c +++ b/apps/recorder/jpeg_load.c | |||
@@ -2024,7 +2024,7 @@ int clip_jpeg_fd(int fd, | |||
2024 | #else | 2024 | #else |
2025 | struct jpeg *p_jpeg = (struct jpeg*)bm->data; | 2025 | struct jpeg *p_jpeg = (struct jpeg*)bm->data; |
2026 | int tmp_size = maxsize; | 2026 | int tmp_size = maxsize; |
2027 | ALIGN_BUFFER(p_jpeg, tmp_size, sizeof(int)); | 2027 | ALIGN_BUFFER(p_jpeg, tmp_size, sizeof(long)); |
2028 | /* not enough memory for our struct jpeg */ | 2028 | /* not enough memory for our struct jpeg */ |
2029 | if ((size_t)tmp_size < sizeof(struct jpeg)) | 2029 | if ((size_t)tmp_size < sizeof(struct jpeg)) |
2030 | return -1; | 2030 | return -1; |
@@ -2133,7 +2133,7 @@ int clip_jpeg_fd(int fd, | |||
2133 | char *buf_end = (char *)bm->data + maxsize; | 2133 | char *buf_end = (char *)bm->data + maxsize; |
2134 | maxsize = buf_end - buf_start; | 2134 | maxsize = buf_end - buf_start; |
2135 | #ifndef JPEG_FROM_MEM | 2135 | #ifndef JPEG_FROM_MEM |
2136 | ALIGN_BUFFER(buf_start, maxsize, sizeof(uint32_t)); | 2136 | ALIGN_BUFFER(buf_start, maxsize, sizeof(long)); |
2137 | if (maxsize < (int)sizeof(struct jpeg)) | 2137 | if (maxsize < (int)sizeof(struct jpeg)) |
2138 | return -1; | 2138 | return -1; |
2139 | memmove(buf_start, p_jpeg, sizeof(struct jpeg)); | 2139 | memmove(buf_start, p_jpeg, sizeof(struct jpeg)); |