dan sinclair ha scritto: > Enlightenment CVS wrote: > >> Enlightenment CVS committal >> >> Author : davemds >> Project : e17 >> Module : libs/engrave >> >> > > >> @@ -452,10 +452,9 @@ >> >> font_key = engrave_part_state_text_font_get(eps); >> efont = engrave_file_font_by_name_find(ef, font_key); >> - font_name = engrave_font_path_get(efont); >> - >> - }else >> - font_name = "Vera.ttf"; >> + snprintf(font_name,4096,"%s/%s",engrave_file_font_dir_get(ef), >> + engrave_font_path_get(efont)); >> + } >> >> evas_object_text_text_set(ep->object, >> engrave_part_state_text_text_get(eps)); >> >> >> > > > What happens if ef is NULL? You won't have a font name anymore as you've > removed the else case. > reinsert the else case > Both of those functions, engrave_file_font_dir_get() and > engrave_font_path_get() can return NULL. That would case a segv on Solaris. > snprintf segv on null parameters? if yes I have to add another check > You should also use sizeof(font_name) in the snprintf instead of > hardcoding the 4096 again. Keeps you from having to change the value in > two places all the time. > > Used PATH_MAX instead > dan > > Thanks for the hits :) Dave
> ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > enlightenment-devel mailing list > enlightenment-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel > ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel