raster pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=7d5f64430b68414ff61ea8c8c09fa890f035320e

commit 7d5f64430b68414ff61ea8c8c09fa890f035320e
Author: Carsten Haitzler (Rasterman) <[email protected]>
Date:   Sun Apr 19 00:44:48 2020 +0100

    shot upload - handle invalid args even though they never will be
    
    since the caller is e's shot module, they will be sane, but coverity
    in theory is right.
    
    fix CID 1425221
---
 src/modules/shot/upload.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/modules/shot/upload.c b/src/modules/shot/upload.c
index b7236a30c..e4f9f8151 100644
--- a/src/modules/shot/upload.c
+++ b/src/modules/shot/upload.c
@@ -99,6 +99,10 @@ elm_main(int argc, char **argv)
    stride    = atoi(argv[4]); // stride per line in bytes
    quality   = atoi(argv[5]); // qwuality to save out as (100 == lossless png)
    if (argc >= 7) out_file = eina_stringshare_add(argv[6]); // out file path
+   if ((w <= 0) || (w > 65535) || (h <= 0) || (h > 65535) ||
+       (stride <= 0) || (stride > (65535 * 4)) ||
+       (quality < 0) || (w > 100))
+     return 1;
 
    // set up buffer window as scratch space
    elm_config_preferred_engine_set("buffer");

-- 


Reply via email to