projects
/
profile
/
common
/
apps
/
native
/
firmware-update-system-ui.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1fdb8d9
)
resolve malloc nullptr dereference problem
07/249807/1
accepted/tizen/unified/20201217.225716
submit/tizen/20201217.044801
author
dyamy-lee
<dyamy.lee@samsung.com>
Thu, 17 Dec 2020 01:14:29 +0000
(10:14 +0900)
committer
dyamy-lee
<dyamy.lee@samsung.com>
Thu, 17 Dec 2020 01:14:29 +0000
(10:14 +0900)
Change-Id: I76f0d453e0300138100f56c4c7ce02178ca0af83
base/fota_png.c
patch
|
blob
|
history
diff --git
a/base/fota_png.c
b/base/fota_png.c
index 18c59838b4454b6ef3a2cf8155a47e49b37bab8b..89ba4d11884b2406a4e2e5fd9f53cde3ab4421fe 100644
(file)
--- a/
base/fota_png.c
+++ b/
base/fota_png.c
@@
-146,6
+146,11
@@
int read_png_file(char *file_name)
png_size_t row_size = 0;
row_pointers = (png_bytep *) malloc(sizeof(png_bytep)*png_img_height);
+ if(row_pointers == NULL)
+ {
+ fclose(fp);
+ return -1;
+ }
for (y = 0; y < png_img_height; y++) {
row_size = png_get_rowbytes(png_ptr, info_ptr);
row_pointers[y] = (png_byte *) malloc(row_size);