billiob pushed a commit to branch master.

http://git.enlightenment.org/apps/terminology.git/commit/?id=4913364a22c7b500d6c6b61ca801bbc451e65979

commit 4913364a22c7b500d6c6b61ca801bbc451e65979
Author: Boris Faure <bill...@gmail.com>
Date:   Sun Nov 8 12:49:08 2015 +0100

    fix int overflow
---
 src/bin/termptyesc.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/bin/termptyesc.c b/src/bin/termptyesc.c
index 1c67064..81ede2f 100644
--- a/src/bin/termptyesc.c
+++ b/src/bin/termptyesc.c
@@ -1,5 +1,6 @@
 #include "private.h"
 #include <Elementary.h>
+#include <stdint.h>
 #include "termio.h"
 #include "termpty.h"
 #include "termptydbl.h"
@@ -100,6 +101,11 @@ _csi_arg_get(Eina_Unicode **ptr)
      }
    while ((*b >= '0') && (*b <= '9'))
      {
+        if (sum > INT32_MAX/10 )
+          {
+             *ptr = NULL;
+             return 0;
+          }
         sum *= 10;
         sum += *b - '0';
         b++;

-- 


Reply via email to