stefan pushed a commit to branch master.

commit 4f484b81d48b73709b3e4b4b1b01e383976ecb0a
Author: Stefan Schmidt <[email protected]>
Date:   Fri Aug 9 11:54:42 2013 +0100

    evas/textblock: Do not write out of bounds.
    
    The length is len so last array index must be len - 1. Better not
    corrupt memory. :)
    
    CID 1039302
---
 src/lib/evas/canvas/evas_object_textblock.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/evas/canvas/evas_object_textblock.c 
b/src/lib/evas/canvas/evas_object_textblock.c
index 9dfb7b0..2904d30 100644
--- a/src/lib/evas/canvas/evas_object_textblock.c
+++ b/src/lib/evas/canvas/evas_object_textblock.c
@@ -5821,7 +5821,7 @@ _escaped_char_get(const char *s, const char *s_end)
            len = sizeof(ustr);
 
         memcpy(ustr, s, len);
-        ustr[len] = '\0';
+        ustr[len - 1] = '\0';
         uchar[0] = strtol(ustr, NULL, base);
 
         if (uchar[0] == 0)

-- 

------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk

Reply via email to