summaryrefslogtreecommitdiff
path: root/src/generic
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2016-07-13 15:21:06 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2016-07-13 15:21:06 +0900
commit3ad848f5c5a580d0c07178c457a687b2bd99de2b (patch)
treecfdc2415a4305585789ba3f853fc8e34d598021a /src/generic
parent0368adfcba149c17a25eaf1ab2291ec89d303506 (diff)
evas: Fix some CID in generic loaders
Check the return value of fwrite. There is nothing sensible to do as the receiver needs to handle the error gracefully. CID 1356613, 1356614, 1356615, 1356200
Diffstat (limited to 'src/generic')
-rw-r--r--src/generic/evas/pdf/main.cpp7
-rw-r--r--src/generic/evas/ps/main.c7
-rw-r--r--src/generic/evas/svg/main.c7
-rw-r--r--src/generic/evas/xcf/main.c7
4 files changed, 24 insertions, 4 deletions
diff --git a/src/generic/evas/pdf/main.cpp b/src/generic/evas/pdf/main.cpp
index 8623179b71..eab137b8ee 100644
--- a/src/generic/evas/pdf/main.cpp
+++ b/src/generic/evas/pdf/main.cpp
@@ -321,7 +321,12 @@ main(int argc, char **argv)
321 // could also to "tmpfile %s\n" like shmfile but just 321 // could also to "tmpfile %s\n" like shmfile but just
322 // a mmaped tmp file on the system 322 // a mmaped tmp file on the system
323 printf("data\n"); 323 printf("data\n");
324 fwrite(data, crop_width * crop_height * sizeof(DATA32), 1, stdout); 324 if (fwrite(data, crop_width * crop_height * sizeof(DATA32), 1, stdout) != 1)
325 {
326 // nothing much to do, the receiver will simply ignore the
327 // data as it's too short
328 D("fwrite failed (%d bytes): %m\n", crop_width * crop_height * sizeof(DATA32));
329 }
325 } 330 }
326 shm_free(); 331 shm_free();
327 } 332 }
diff --git a/src/generic/evas/ps/main.c b/src/generic/evas/ps/main.c
index 48e8a4b6f6..c5b8a18ff6 100644
--- a/src/generic/evas/ps/main.c
+++ b/src/generic/evas/ps/main.c
@@ -276,7 +276,12 @@ main(int argc, char **argv)
276 // could also to "tmpfile %s\n" like shmfile but just 276 // could also to "tmpfile %s\n" like shmfile but just
277 // a mmaped tmp file on the system 277 // a mmaped tmp file on the system
278 printf("data\n"); 278 printf("data\n");
279 fwrite(data, width * height * sizeof(DATA32), 1, stdout); 279 if (fwrite(data, width * height * sizeof(DATA32), 1, stdout) != 1)
280 {
281 // nothing much to do, the receiver will simply ignore the
282 // data as it's too short
283 D("fwrite failed (%d bytes): %m\n", width * height * sizeof(DATA32));
284 }
280 } 285 }
281 shm_free(); 286 shm_free();
282 } 287 }
diff --git a/src/generic/evas/svg/main.c b/src/generic/evas/svg/main.c
index 8c46708d92..f1973303ee 100644
--- a/src/generic/evas/svg/main.c
+++ b/src/generic/evas/svg/main.c
@@ -218,7 +218,12 @@ int main(int argc, char **argv)
218 else 218 else
219 { 219 {
220 printf("data\n"); 220 printf("data\n");
221 fwrite(shm_addr, width * height * sizeof(DATA32), 1, stdout); 221 if (fwrite(shm_addr, width * height * sizeof(DATA32), 1, stdout) != 1)
222 {
223 // nothing much to do, the receiver will simply ignore the
224 // data as it's too short
225 //D("fwrite failed (%d bytes): %m\n", width * height * sizeof(DATA32));
226 }
222 } 227 }
223 shm_free(); 228 shm_free();
224 } 229 }
diff --git a/src/generic/evas/xcf/main.c b/src/generic/evas/xcf/main.c
index 4de03f8be8..c5ef6a82d6 100644
--- a/src/generic/evas/xcf/main.c
+++ b/src/generic/evas/xcf/main.c
@@ -1723,7 +1723,12 @@ main(int argc, char **argv)
1723 // could also to "tmpfile %s\n" like shmfile but just 1723 // could also to "tmpfile %s\n" like shmfile but just
1724 // a mmaped tmp file on the system 1724 // a mmaped tmp file on the system
1725 printf("data\n"); 1725 printf("data\n");
1726 fwrite(image->data, w * h * sizeof(DATA32), 1, stdout); 1726 if (fwrite(image->data, w * h * sizeof(DATA32), 1, stdout) != 1)
1727 {
1728 // nothing much to do, the receiver will simply ignore the
1729 // data as it's too short
1730 D("fwrite failed (%d bytes): %m\n", w * h * sizeof(DATA32));
1731 }
1727 } 1732 }
1728 shm_free(); 1733 shm_free();
1729 } 1734 }