diff -Nru xjump-2.7.5/debian/changelog xjump-2.7.5/debian/changelog --- xjump-2.7.5/debian/changelog 2012-05-06 03:51:17.000000000 -0300 +++ xjump-2.7.5/debian/changelog 2015-03-30 22:57:52.000000000 -0300 @@ -1,3 +1,10 @@ +xjump (2.7.5-6.2) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Fix buffer overflow when showing high scores + + -- Hugo Musso Gualandi Mon, 30 Mar 2015 22:55:40 -0300 + xjump (2.7.5-6.1) unstable; urgency=low * Non-maintainer upload; ACKed by the maintainer. diff -Nru xjump-2.7.5/debian/patches/fix-buffer-overflow.patch xjump-2.7.5/debian/patches/fix-buffer-overflow.patch --- xjump-2.7.5/debian/patches/fix-buffer-overflow.patch 1969-12-31 21:00:00.000000000 -0300 +++ xjump-2.7.5/debian/patches/fix-buffer-overflow.patch 2015-03-30 23:29:57.000000000 -0300 @@ -0,0 +1,36 @@ +Index: xjump-2.7.5/main.c +=================================================================== +--- xjump-2.7.5.orig/main.c ++++ xjump-2.7.5/main.c +@@ -58,7 +58,7 @@ static int GameMode; /* ¥â¡¼¥É (0¥¿¥¤¥È¥ + + static unsigned int Sc_now; + +-static char Score_list[43*(RECORD_ENTRY+2)+1]=""; /* ¥Ï¥¤¥¹¥³¥¢¥Æ¥­¥¹¥È */ ++static char Score_list[45*(RECORD_ENTRY+2)+1]=""; /* ¥Ï¥¤¥¹¥³¥¢¥Æ¥­¥¹¥È */ + + static XKeyboardState Keyboard; /* ¥­¡¼¥Ü¡¼¥É¥¹¥Æ¡¼¥¿¥¹ */ + static int Repeat_mode = 1; /* ¥­¡¼¥ê¥Ô¡¼¥È¤Î¾õÂÖ(1:default 0:off) */ +@@ -154,10 +154,18 @@ static void make_score( void ) + p += sprintf( p,"RANK FLOOR NAME\n\ + ---- ---------- -------------------------------\n"); + +- for( i = 0 ; i < Record_entry ; i++ ) +- p += sprintf( p,"%4d %10d %-20.20s\n",i+1, +- Record[i].score,Record[i].name ); +- ++ for( i = 0 ; i < Record_entry ; i++ ){ ++ size_t space_available = sizeof(Score_list) - (p-Score_list); ++ int nprinted = snprintf(p, space_available, ++ "%4d %10d %-20.20s\n",i+1, Record[i].score, Record[i].name ); ++ if(nprinted <= space_available){ ++ p += nprinted; ++ }else{ ++ p += space_available; ++ break; ++ } ++ } ++ + p--; + *p = '\0'; + diff -Nru xjump-2.7.5/debian/patches/series xjump-2.7.5/debian/patches/series --- xjump-2.7.5/debian/patches/series 2012-04-12 06:01:25.000000000 -0300 +++ xjump-2.7.5/debian/patches/series 2015-03-30 23:35:05.000000000 -0300 @@ -3,3 +3,4 @@ 03_source_warnings.patch 04_makefile_respect_cflags.patch 05_unneded_deps.patch +fix-buffer-overflow.patch