summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHermet Park <hermetpark@gmail.com>2019-12-24 18:46:55 +0900
committerHermet Park <hermetpark@gmail.com>2019-12-24 18:46:55 +0900
commitf3e0448bd38c0450293d29c908992548993bc38b (patch)
treec0daaa0ad5b44fd1a03602eeddaa958e2a6a7266
parentd540c8420bc280cf94a84e2c9b8e157f23698cb0 (diff)
fix array bounds overflow.
-rw-r--r--src/bin/proxy_textblock.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/bin/proxy_textblock.c b/src/bin/proxy_textblock.c
index 691756c..262b81e 100644
--- a/src/bin/proxy_textblock.c
+++ b/src/bin/proxy_textblock.c
@@ -12,13 +12,13 @@
12# include "main.h" 12# include "main.h"
13 13
14#undef OBNUM 14#undef OBNUM
15#define OBNUM 1 15#define OBNUM 4
16 16
17/* standard var */ 17/* standard var */
18static int done = 0; 18static int done = 0;
19 19
20/* private data */ 20/* private data */
21static Evas_Object *o_texts[OBNUM * 3]; 21static Evas_Object *o_texts[OBNUM];
22 22
23//uncomment to test vs plain textblock render perf 23//uncomment to test vs plain textblock render perf
24//#define PROXY_CMP 1 24//#define PROXY_CMP 1
@@ -29,7 +29,7 @@ static void _setup(void)
29 int i; 29 int i;
30 Evas_Object *o, *clip, *proxy; 30 Evas_Object *o, *clip, *proxy;
31 31
32 for (i = 0; i < OBNUM * 4; i++) 32 for (i = 0; i < OBNUM; i++)
33 { 33 {
34 o = efl_add(EFL_CANVAS_TEXTBLOCK_CLASS, evas); 34 o = efl_add(EFL_CANVAS_TEXTBLOCK_CLASS, evas);
35 o_texts[i] = o; 35 o_texts[i] = o;
@@ -96,7 +96,7 @@ static void _setup(void)
96static void _cleanup(void) 96static void _cleanup(void)
97{ 97{
98 int i; 98 int i;
99 for (i = 0; i < OBNUM * 4; i++) efl_del(o_texts[i]); 99 for (i = 0; i < OBNUM; i++) efl_del(o_texts[i]);
100} 100}
101 101
102/* loop - do things */ 102/* loop - do things */
@@ -104,7 +104,7 @@ static void _loop(double t, int f)
104{ 104{
105 int i; 105 int i;
106 Evas_Coord x, y, w, h; 106 Evas_Coord x, y, w, h;
107 for (i = 0; i < OBNUM * 4; i++) 107 for (i = 0; i < OBNUM; i++)
108 { 108 {
109 w = 480; 109 w = 480;
110 h = 160; 110 h = 160;