Summary: | games-puzzle/icebreaker fails to compile with format-security | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Agostino Sarubbo <ago> |
Component: | Current packages | Assignee: | Gentoo Games <games> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 259417 | ||
Attachments: | icebreaker-1.9.6:20150121-115130.log |
Description
Agostino Sarubbo
![]() Created attachment 394468 [details]
icebreaker-1.9.6:20150121-115130.log
build log
--- icebreaker-1.9.6-gentoo.patch +++ icebreaker-1.9.6-gentoo.patch @@ -24,7 +24,7 @@ --- menu.c +++ menu.c -@@ -193,12 +193,12 @@ PopupReturnType popupoptionsmenu() +@@ -193,12 +193,12 @@ if (strlen(commandline.theme)>0) { @@ -39,16 +39,18 @@ originalthemecl=false; } -@@ -521,7 +521,7 @@ PopupReturnType menuitem_theme(char * va +@@ -521,8 +521,8 @@ if (((mbutton==1 || mbutton==4) && t==themecount-1) || ((mbutton!=1 && mbutton!=4) && t==0)) { // "random", at the end/beginning of the list - strncpy(val,"random",MAXMENUVALUELENGTH); +- snprintf(options.theme,MAXMENUVALUELENGTH,"random"); + strcpy(options.theme,"random"); - snprintf(options.theme,MAXMENUVALUELENGTH,"random"); ++ snprintf(options.theme,MAXTHEMENAMELENGTH,"random"); settheme("linux"); // just for pretty -@@ -538,7 +538,7 @@ PopupReturnType menuitem_theme(char * va + +@@ -538,13 +538,13 @@ if (mbutton==1 || mbutton==4) // left click or scroll forwards { strncpy(val,themelist[(t+1)%themecount],MAXMENUVALUELENGTH); @@ -57,6 +59,13 @@ } else // right or middle or scroll back { + if (t<0) t=themecount; + strncpy(val,themelist[(t-1)%themecount],MAXMENUVALUELENGTH); +- snprintf(options.theme,MAXMENUVALUELENGTH,themelist[(t-1)%themecount]); ++ snprintf(options.theme,sizeof(options.theme),"%s",themelist[(t+1)%themecount]); + } + + settheme(options.theme); --- hiscore.c +++ hiscore.c @@ -72,7 +72,7 @@ The icebreaker-1.9.6-gentoo.patch was incomplete. I've added the last bit and recommend deleting the icebreaker-1.9.6-ovfl.patch as they both modify the same source (main.c) It should be fixed. Thanks for report |