summaryrefslogtreecommitdiff
path: root/src/bin/eolian
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2014-08-20 09:03:38 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2014-08-20 09:05:58 +0900
commitc77accc0b9a43699c305b028b51b2212516b439f (patch)
tree5da611e84742feefb2b4c627dac220db3c95f4f4 /src/bin/eolian
parente79f88f8e99d22d00ec87a3aca615c7a7aa6af98 (diff)
eolain impl generator - fix possible null access
fix CID 1231994
Diffstat (limited to 'src/bin/eolian')
-rw-r--r--src/bin/eolian/impl_generator.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/bin/eolian/impl_generator.c b/src/bin/eolian/impl_generator.c
index eca0e3438e..483b53156d 100644
--- a/src/bin/eolian/impl_generator.c
+++ b/src/bin/eolian/impl_generator.c
@@ -180,16 +180,21 @@ _prototype_generate(const Eolian_Function *foo, Eolian_Function_Type ftype, Eina
180 } 180 }
181 181
182 fname = eolian_function_name_get(foo); 182 fname = eolian_function_name_get(foo);
183 flen = strlen(fname); 183 if (fname)
184 if ((fname) && (flen >= strlen("destructor")))
185 { 184 {
186 if (impl_desc && !strcmp(fname + flen - strlen("destructor"), "destructor")) 185 flen = strlen(fname);
186 if (flen >= strlen("destructor"))
187 { 187 {
188 eina_strbuf_append_printf(super_invok, 188 if (impl_desc &&
189 (!strcmp(fname + flen - strlen("destructor"), "destructor")))
190 {
191 eina_strbuf_append_printf
192 (super_invok,
189 " eo_do_super(obj, %s_%s, %s_%s(%s));\n", 193 " eo_do_super(obj, %s_%s, %s_%s(%s));\n",
190 class_env.upper_eo_prefix, class_env.upper_classtype, 194 class_env.upper_eo_prefix, class_env.upper_classtype,
191 impl_env.lower_eo_prefix, eolian_function_name_get(foo), 195 impl_env.lower_eo_prefix, eolian_function_name_get(foo),
192 eina_strbuf_string_get(short_params)); 196 eina_strbuf_string_get(short_params));
197 }
193 } 198 }
194 } 199 }
195 200