On Sat, 15 Jan 2011, Enlightenment SVN wrote:
> Log: > avoid possible strlen(NULL) > > > Author: discomfitor > Date: 2011-01-15 17:11:46 -0800 (Sat, 15 Jan 2011) > New Revision: 56144 > Trac: http://trac.enlightenment.org/e/changeset/56144 > > Modified: > trunk/e/src/bin/e_menu.c > > Modified: trunk/e/src/bin/e_menu.c > =================================================================== > --- trunk/e/src/bin/e_menu.c 2011-01-15 20:25:44 UTC (rev 56143) > +++ trunk/e/src/bin/e_menu.c 2011-01-16 01:11:46 UTC (rev 56144) > @@ -619,10 +619,13 @@ > if (mi->icon_key) eina_stringshare_del(mi->icon_key); > mi->icon = NULL; > mi->icon_key = NULL; > - if (icon) mi->icon = eina_stringshare_add(icon); > - len = strlen(icon); > - if ((len > 4) && (!strcasecmp(icon + len - 4, ".edj"))) > - mi->icon_key = eina_stringshare_add("icon"); > + if (icon) > + { > + mi->icon = eina_stringshare_add(icon); > + len = strlen(icon); > + if ((len > 4) && (!strcasecmp(icon + len - 4, ".edj"))) > + mi->icon_key = eina_stringshare_add("icon"); use eina_str_has_suffix() function > + } > mi->changed = 1; > mi->menu->changed = 1; > } > > > ------------------------------------------------------------------------------ > Protect Your Site and Customers from Malware Attacks > Learn about various malware tactics and how to avoid them. Understand > malware threats, the impact they can have on your business, and how you > can protect your company and customers by using code signing. > http://p.sf.net/sfu/oracle-sfdevnl > _______________________________________________ > enlightenment-svn mailing list > enlightenment-...@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/enlightenment-svn > > ------------------------------------------------------------------------------ Protect Your Site and Customers from Malware Attacks Learn about various malware tactics and how to avoid them. Understand malware threats, the impact they can have on your business, and how you can protect your company and customers by using code signing. http://p.sf.net/sfu/oracle-sfdevnl _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel