From: jiyong.min Date: Thu, 31 Jan 2019 23:08:42 +0000 (+0900) Subject: Change the value for checking fread() to the number of items X-Git-Tag: submit/tizen_5.0/20190219.010815^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fheads%2Faccepted%2Ftizen_5.0_unified;p=platform%2Fcore%2Fapi%2Fmetadata-editor.git Change the value for checking fread() to the number of items Change-Id: I95149c62b7be1b73990830bb0ffa7f10404e16de (cherry picked from commit 6f5913629493ce5a2e7b5ea9fe59ce4662f43ea1) --- diff --git a/src/metadata_editor.cpp b/src/metadata_editor.cpp index 61034fd..92b73b4 100755 --- a/src/metadata_editor.cpp +++ b/src/metadata_editor.cpp @@ -781,7 +781,7 @@ int __metadata_editor_get_picture_info(const char *path, void **picture, int *si memset(picture_buffer, 0, file_size * sizeof(char)); fin = fopen(path, "rb"); if (fin) { - if(file_size != fread(picture_buffer, file_size, 1, fin)) { + if(file_size != fread(picture_buffer, 1, file_size, fin)) { metadata_editor_error("fread error"); fclose(fin); return METADATA_EDITOR_ERROR_OPERATION_FAILED;