Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 79447 Details for
Bug 122399
games-misc/bsd-games: tetris-bsd buffer overflows
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
sec patch
tetris-sec.diff (text/plain), 1.10 KB, created by
Tavis Ormandy (RETIRED)
on 2006-02-10 10:29:36 UTC
(
hide
)
Description:
sec patch
Filename:
MIME Type:
Creator:
Tavis Ormandy (RETIRED)
Created:
2006-02-10 10:29:36 UTC
Size:
1.10 KB
patch
obsolete
>--- bsd-games-2.13/tetris/scores.c.orig 2006-02-10 18:11:41.704770280 +0000 >+++ bsd-games-2.13/tetris/scores.c 2006-02-10 18:25:15.927989536 +0000 >@@ -339,7 +339,8 @@ > continue; > } > } >- levelfound[sp->hs_level] = 1; >+ if (sp->hs_level < NLEVELS && sp->hs_level >= 0) >+ levelfound[sp->hs_level] = 1; > i++, sp++; > } > return (num > MAXHISCORES ? MAXHISCORES : num); >@@ -378,12 +379,14 @@ > for (i = MINLEVEL; i < NLEVELS; i++) > levelfound[i] = 0; > for (i = 0, sp = scores; i < nscores; i++, sp++) { >- if (levelfound[sp->hs_level]) >- sp->hs_time = 0; >- else { >- sp->hs_time = 1; >- levelfound[sp->hs_level] = 1; >- } >+ if (sp->hs_level < NLEVELS && sp->hs_level >= 0) { >+ if (levelfound[sp->hs_level]) >+ sp->hs_time = 0; >+ else { >+ sp->hs_time = 1; >+ levelfound[sp->hs_level] = 1; >+ } >+ } > } > > /* >@@ -437,7 +440,7 @@ > continue; > } > sp = &hs[item]; >- (void)sprintf(buf, >+ (void)snprintf(buf, sizeof(buf), > "%3d%c %6d %-11s (%6d on %d)", > item + offset, sp->hs_time ? '*' : ' ', > sp->hs_score * sp->hs_level,
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 122399
: 79447