projects
/
platform
/
core
/
api
/
metadata-extractor.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6836446
)
Change the size and nmemb of fread() to check the return value
12/199012/2
author
jiyong.min
<jiyong.min@samsung.com>
Fri, 1 Feb 2019 00:35:08 +0000
(09:35 +0900)
committer
jiyong.min
<jiyong.min@samsung.com>
Fri, 1 Feb 2019 00:42:53 +0000
(09:42 +0900)
Change-Id: I5b23ae389ba5a312592354df7bb598c589eed461
test/metadata_extractor_test.c
patch
|
blob
|
history
diff --git
a/test/metadata_extractor_test.c
b/test/metadata_extractor_test.c
index
9195b4d
..
7196bdc
100755
(executable)
--- a/
test/metadata_extractor_test.c
+++ b/
test/metadata_extractor_test.c
@@
-32,7
+32,7
@@
size = ftell(fp); \
fseek(fp, 0, SEEK_SET); \
if (size > 0) data = malloc(size); \
- if (data != NULL) { if (fread(data, size
, sizeof(char)
, fp) != size) { printf("fread error\n"); } } \
+ if (data != NULL) { if (fread(data, size
of(char), size
, fp) != size) { printf("fread error\n"); } } \
fclose(fp); \
printf("file size = %d\n", size); \
} \