Hello community, here is the log from the commit of package black-box checked in at Mon May 29 01:02:54 CEST 2006. -------- --- black-box/black-box.changes 2006-02-24 17:24:17.000000000 +0100 +++ black-box/black-box.changes 2006-05-28 02:59:13.000000000 +0200 @@ -1,0 +2,6 @@ +Sat May 27 19:47:28 CEST 2006 - schwab@suse.de + +- Don't strip binaries. +- Fix out-of-range array access. + +------------------------------------------------------------------- New: ---- black-box-1.4.7-range.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ black-box.spec ++++++ --- /var/tmp/diff_new_pack.lpsh6I/_old 2006-05-29 01:02:42.000000000 +0200 +++ /var/tmp/diff_new_pack.lpsh6I/_new 2006-05-29 01:02:42.000000000 +0200 @@ -16,11 +16,12 @@ Group: Amusements/Games/Board/Puzzle Summary: Puzzle Game Version: 1.4.7 -Release: 4 +Release: 14 URL: http://www.linux-games.com/black-box/ Source: black-box-%{version}.tar.bz2 Patch: black-box-%{version}.patch Patch1: black-box-1.4.7-uninitialized.patch +Patch2: black-box-1.4.7-range.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -36,6 +37,7 @@ %setup %patch %patch1 +%patch2 %build %{suse_update_config -f} @@ -46,8 +48,7 @@ make %install -rm -rf $RPM_BUILD_ROOT -make DESTDIR=$RPM_BUILD_ROOT install-strip +make DESTDIR=$RPM_BUILD_ROOT install %clean rm -rf $RPM_BUILD_ROOT @@ -59,6 +60,9 @@ /usr/share/black-box %changelog -n black-box +* Sat May 27 2006 - schwab@suse.de +- Don't strip binaries. +- Fix out-of-range array access. * Fri Feb 24 2006 - lmichnovic@suse.cz - fixed uninitialized variable [#152888] * Wed Jan 25 2006 - mls@suse.de ++++++ black-box-1.4.7-range.patch ++++++ --- src/blackbox.c +++ src/blackbox.c @@ -408,29 +408,29 @@ if (dir==0) { if (y==0) {end=1;} else - if (real[x-1][y-1]==1) {dir=1;} else - if (real[x][y-1]==1) {dir=3;} + if (x!=0&&real[x-1][y-1]==1) {dir=1;} else + if (x!=11&&real[x][y-1]==1) {dir=3;} else {y--;} } if (dir==1) { - if (x==12) {end=1;} else - if (real[x][y]==1) {dir=0;} else - if (real[x][y-1]==1) {dir=2;} + if (x==11) {end=1;} else + if (y!=9&&real[x][y]==1) {dir=0;} else + if (y!=0&&real[x][y-1]==1) {dir=2;} else {x++;} } if (dir==2) { if (y==9) {end=1;} else - if (real[x][y]==1) {dir=3;} else - if (real[x-1][y]==1) {dir=1;} + if (x!=11&&real[x][y]==1) {dir=3;} else + if (x!=0&&real[x-1][y]==1) {dir=1;} else {y++;} } if (dir==3) { if (x==0) {end=1;} else - if (real[x-1][y]==1) {dir=0;} else - if (real[x-1][y-1]==1) {dir=2;} + if (y!=9&&real[x-1][y]==1) {dir=0;} else + if (y!=0&&real[x-1][y-1]==1) {dir=2;} else {x--;} } if ((x>30)||(y>20)||(y<0)||(y<0)) @@ -457,29 +457,29 @@ if (dir==0) { if (y==0) {end=1;} else - if (think[x-1][y-1]==1) {dir=1;} else - if (think[x][y-1]==1) {dir=3;} + if (x!=0&&think[x-1][y-1]==1) {dir=1;} else + if (x!=11&&think[x][y-1]==1) {dir=3;} else {y--;} } if (dir==1) { - if (x==12) {end=1;} else - if (think[x][y]==1) {dir=0;} else - if (think[x][y-1]==1) {dir=2;} + if (x==11) {end=1;} else + if (y!=9&&think[x][y]==1) {dir=0;} else + if (y!=0&&think[x][y-1]==1) {dir=2;} else {x++;} } if (dir==2) { if (y==9) {end=1;} else - if (think[x][y]==1) {dir=3;} else - if (think[x-1][y]==1) {dir=1;} + if (x!=11&&think[x][y]==1) {dir=3;} else + if (x!=0&&think[x-1][y]==1) {dir=1;} else {y++;} } if (dir==3) { if (x==0) {end=1;} else - if (think[x-1][y]==1) {dir=0;} else - if (think[x-1][y-1]==1) {dir=2;} + if (y!=9&&think[x-1][y]==1) {dir=0;} else + if (y!=0&&think[x-1][y-1]==1) {dir=2;} else {x--;} } if ((x>30)||(y>20)||(y<0)||(y<0)) @@ -581,29 +581,29 @@ if (dir==0) { if (y==0) {end=1;} else - if (real[x-1][y-1]==1) {dir=1;} else - if (real[x][y-1]==1) {dir=3;} + if (x!=0&&real[x-1][y-1]==1) {dir=1;} else + if (x!=11&&real[x][y-1]==1) {dir=3;} else {y--;} } if (dir==1) { - if (x==12) {end=1;} else - if (real[x][y]==1) {dir=0;} else - if (real[x][y-1]==1) {dir=2;} + if (x==11) {end=1;} else + if (y!=9&&real[x][y]==1) {dir=0;} else + if (y!=0&&real[x][y-1]==1) {dir=2;} else {x++;} } if (dir==2) { if (y==9) {end=1;} else - if (real[x][y]==1) {dir=3;} else - if (real[x-1][y]==1) {dir=1;} + if (x!=11&&real[x][y]==1) {dir=3;} else + if (x!=0&&real[x-1][y]==1) {dir=1;} else {y++;} } if (dir==3) { if (x==0) {end=1;} else - if (real[x-1][y]==1) {dir=0;} else - if (real[x-1][y-1]==1) {dir=2;} + if (y!=9&&real[x-1][y]==1) {dir=0;} else + if (y!=0&&real[x-1][y-1]==1) {dir=2;} else {x--;} } if ((x>30)||(y>20)||(y<0)||(y<0)) @@ -834,15 +834,15 @@ { //block highlighting case SDL_BUTTON(3): - if ((light[div(mouse_x+25,50).quot-2][div(mouse_y+25,50).quot-2]==0) - &&(div(mouse_x+25,50).quot>1)&&(div(mouse_y+25,50).quot>1) - &&(div(mouse_x+25,50).quot<13)&&(div(mouse_y+25,50).quot<11)) + if ((div(mouse_x+25,50).quot>1)&&(div(mouse_y+25,50).quot>1) + &&(div(mouse_x+25,50).quot<13)&&(div(mouse_y+25,50).quot<11) + &&(light[div(mouse_x+25,50).quot-2][div(mouse_y+25,50).quot-2]==0)) { light[div(mouse_x+25,50).quot-2][div(mouse_y+25,50).quot-2]=1; }else - if ((light[div(mouse_x+25,50).quot-2][div(mouse_y+25,50).quot-2]==1) - &&(div(mouse_x+25,50).quot>1)&&(div(mouse_y+25,50).quot>1) - &&(div(mouse_x+25,50).quot<13)&&(div(mouse_y+25,50).quot<11)) + if ((div(mouse_x+25,50).quot>1)&&(div(mouse_y+25,50).quot>1) + &&(div(mouse_x+25,50).quot<13)&&(div(mouse_y+25,50).quot<11) + &&(light[div(mouse_x+25,50).quot-2][div(mouse_y+25,50).quot-2]==1)) { light[div(mouse_x+25,50).quot-2][div(mouse_y+25,50).quot-2]=0; } @@ -889,15 +889,15 @@ break; case SDL_BUTTON(1): //think - if ((think[div(mouse_x,50).quot-2][div(mouse_y,50).quot-2]==0) - &&(div(mouse_x,50).quot>1)&&(div(mouse_y,50).quot>1) - &&(div(mouse_x,50).quot<12)&&(div(mouse_y,50).quot<10)) + if ((div(mouse_x,50).quot>1)&&(div(mouse_y,50).quot>1) + &&(div(mouse_x,50).quot<12)&&(div(mouse_y,50).quot<10) + &&(think[div(mouse_x,50).quot-2][div(mouse_y,50).quot-2]==0)) { think[div(mouse_x,50).quot-2][div(mouse_y,50).quot-2]=1; } else - if ((think[div(mouse_x,50).quot-2][div(mouse_y,50).quot-2]==1) - &&(div(mouse_x,50).quot>1)&&(div(mouse_y,50).quot>1) - &&(div(mouse_x,50).quot<12)&&(div(mouse_y,50).quot<10)) + if ((div(mouse_x,50).quot>1)&&(div(mouse_y,50).quot>1) + &&(div(mouse_x,50).quot<12)&&(div(mouse_y,50).quot<10) + &&(think[div(mouse_x,50).quot-2][div(mouse_y,50).quot-2]==1)) { think[div(mouse_x,50).quot-2][div(mouse_y,50).quot-2]=0; } ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun...
participants (1)
-
root@suse.de