summaryrefslogtreecommitdiff
path: root/src/codec
diff options
context:
space:
mode:
authorJi Yong Min <jiyong.min@samsung.com>2015-12-31 11:13:38 +0900
committerJi Yong Min <jiyong.min@samsung.com>2015-12-31 11:15:08 +0900
commit0b93b1b8120f67ff36262e6f2b9a75f7cf1670e3 (patch)
treebc6138d9eac5e2f1f331a9903bb21f46d3f67e52 /src/codec
parent292143cf12c6261504527db7022f365bd16f1a1c (diff)
downloadlibmedia-thumbnail-0b93b1b8120f67ff36262e6f2b9a75f7cf1670e3.tar.gz
libmedia-thumbnail-0b93b1b8120f67ff36262e6f2b9a75f7cf1670e3.tar.bz2
libmedia-thumbnail-0b93b1b8120f67ff36262e6f2b9a75f7cf1670e3.zip
Change-Id: Id4c6844de04c8c976d46f4d0d0a8147ce3d8a973 Signed-off-by: Jiyong Min <jiyong.min@samsung.com>
Diffstat (limited to 'src/codec')
-rwxr-xr-xsrc/codec/IfegDecodeAGIF.c2
-rwxr-xr-xsrc/codec/img-codec.c7
2 files changed, 4 insertions, 5 deletions
diff --git a/src/codec/IfegDecodeAGIF.c b/src/codec/IfegDecodeAGIF.c
index db69692..b6a08f2 100755
--- a/src/codec/IfegDecodeAGIF.c
+++ b/src/codec/IfegDecodeAGIF.c
@@ -111,8 +111,6 @@ AGifFrameInfo *FastImgCreateAGIFFrameData(unsigned int width, unsigned int heigh
if (transparent == 1 && backcolor_index == transIndex) {
image_backcolor = ui_backcolor;
- } else if (transparent == 1 && backcolor_index != transIndex) {
- image_backcolor = backcolor_parsing;
} else {
image_backcolor = backcolor_parsing;
}
diff --git a/src/codec/img-codec.c b/src/codec/img-codec.c
index 1887e47..e37ab8b 100755
--- a/src/codec/img-codec.c
+++ b/src/codec/img-codec.c
@@ -151,8 +151,8 @@ AGifFrameInfo *ImgCreateAGIFFrame(const char *szFileName, unsigned int width, un
DrmGetFileAttributes(szFileName, &fileAttrib);
- if (fileAttrib.fileSize == 0) {
- thumb_err("Zero File Size");
+ if (fileAttrib.fileSize <= 0) {
+ thumb_err("Zero or below Zero File Size");
DrmCloseFile(hFile);
return NULL;
}
@@ -161,7 +161,8 @@ AGifFrameInfo *ImgCreateAGIFFrame(const char *szFileName, unsigned int width, un
/* A size of allocated memory - w * h *2 means RGB565 and 4096 means the max of header length */
// mem_alloc_size = width * height * 2 + MAX_GIF_HEADER_SIZE;
mem_alloc_size = cFileSize;
- if ((pEncodedData = (unsigned char *)malloc(mem_alloc_size)) == NULL) {
+ pEncodedData = (unsigned char *)malloc(mem_alloc_size);
+ if (pEncodedData == NULL) {
thumb_err("Memory Allocation to pEncodedData failed");
DrmCloseFile(hFile);
return NULL;