Author: apo Date: 2017-10-21 15:05:24 +0000 (Sat, 21 Oct 2017) New Revision: 16030
Added: packages/trunk/biniax2/debian/patches/compiler-warnings.patch Modified: packages/trunk/biniax2/debian/changelog packages/trunk/biniax2/debian/patches/series packages/trunk/biniax2/debian/patches/userdir.patch Log: Release 1.30-4 Modified: packages/trunk/biniax2/debian/changelog =================================================================== --- packages/trunk/biniax2/debian/changelog 2017-10-18 15:43:29 UTC (rev 16029) +++ packages/trunk/biniax2/debian/changelog 2017-10-21 15:05:24 UTC (rev 16030) @@ -1,3 +1,11 @@ +biniax2 (1.30-4) unstable; urgency=medium + + * Team upload. + * Add compiler-warnings.patch, fix various compiler warnings and a crash + because of undefined behavior. + + -- Markus Koschany <[email protected]> Sat, 21 Oct 2017 16:53:26 +0200 + biniax2 (1.30-3) unstable; urgency=medium * Team upload. Added: packages/trunk/biniax2/debian/patches/compiler-warnings.patch =================================================================== --- packages/trunk/biniax2/debian/patches/compiler-warnings.patch (rev 0) +++ packages/trunk/biniax2/debian/patches/compiler-warnings.patch 2017-10-21 15:05:24 UTC (rev 16030) @@ -0,0 +1,88 @@ +From: Markus Koschany <[email protected]> +Date: Sat, 21 Oct 2017 16:47:03 +0200 +Subject: compiler warnings + +Fix various compiler warnings. The most serious are +warning: function returns address of local variable in hof.c and biniax.c. +This is undefined behavior and crashes the game. + +Forwarded: no +--- + biniax.c | 5 +++-- + desktop/sys.c | 2 +- + desktop/sys.h | 2 +- + hof.c | 5 +++-- + 4 files changed, 8 insertions(+), 6 deletions(-) + +diff --git a/biniax.c b/biniax.c +index 06f2500..e12cc0f 100755 +--- a/biniax.c ++++ b/biniax.c +@@ -1218,6 +1218,7 @@ static const char *saveFileName() + { + #ifndef _WIN32 + char filename[1024]; ++ static char* autosave_path; + char *home; + struct passwd *passwd; + if (!getuid()) +@@ -1262,8 +1263,8 @@ static const char *saveFileName() + return BNX_FALSE; + } + } +- strncat(filename, "/autosave", sizeof(filename)-1); +- return filename; ++ autosave_path = strncat(filename, "/autosave", sizeof(filename)-1); ++ return autosave_path; + #else + return "./autosave.bnx2"; + #endif +diff --git a/desktop/sys.c b/desktop/sys.c +index 20528c0..1af436b 100755 +--- a/desktop/sys.c ++++ b/desktop/sys.c +@@ -73,7 +73,7 @@ void sysUpdate() + FILE FUNCTIONS + ******************************************************************************/ + +-BNX_UINT32 sysGetFileLen( char *file ) ++BNX_UINT32 sysGetFileLen( const char *file ) + { + BNX_UINT32 len = 0; + FILE *f; +diff --git a/desktop/sys.h b/desktop/sys.h +index 5a266c7..2dfe7c3 100755 +--- a/desktop/sys.h ++++ b/desktop/sys.h +@@ -65,7 +65,7 @@ void sysUpdate(); + FILE FUNCIONS + ******************************************************************************/ + +-BNX_UINT32 sysGetFileLen( char *file ); ++BNX_UINT32 sysGetFileLen( const char *file ); + + void sysFPut8( BNX_UINT8 n, FILE *f ); + void sysFPut16( BNX_UINT16 n, FILE *f ); +diff --git a/hof.c b/hof.c +index d0c6efb..34c5d49 100755 +--- a/hof.c ++++ b/hof.c +@@ -106,6 +106,7 @@ static const char *hofFileName() + { + #ifndef _WIN32 + char filename[1024]; ++ static char* hof_path; + char *home; + struct passwd *passwd; + if (!getuid()) +@@ -150,8 +151,8 @@ static const char *hofFileName() + return BNX_FALSE; + } + } +- strncat(filename, "/hof", sizeof(filename)-1); +- return filename; ++ hof_path = strncat(filename, "/hof", sizeof(filename)-1); ++ return hof_path; + #else + return "./hof.bnx2"; + #endif Modified: packages/trunk/biniax2/debian/patches/series =================================================================== --- packages/trunk/biniax2/debian/patches/series 2017-10-18 15:43:29 UTC (rev 16029) +++ packages/trunk/biniax2/debian/patches/series 2017-10-21 15:05:24 UTC (rev 16030) @@ -2,3 +2,4 @@ userdir.patch warnings.patch hardening-support.patch +compiler-warnings.patch Modified: packages/trunk/biniax2/debian/patches/userdir.patch =================================================================== --- packages/trunk/biniax2/debian/patches/userdir.patch 2017-10-18 15:43:29 UTC (rev 16029) +++ packages/trunk/biniax2/debian/patches/userdir.patch 2017-10-21 15:05:24 UTC (rev 16030) @@ -3,10 +3,10 @@ Subject: userdir --- - biniax.c | 228 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++- - desktop/cfg.c | 122 +++++++++++++++++++++++------- - hof.c | 202 ++++++++++++++++++++++++++++++++++++++++++++++++-- - inc.h | 4 + + biniax.c | 228 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++-- + desktop/cfg.c | 122 ++++++++++++++++++++++++------- + hof.c | 202 +++++++++++++++++++++++++++++++++++++++++++++++++-- + inc.h | 4 ++ 4 files changed, 520 insertions(+), 36 deletions(-) diff --git a/biniax.c b/biniax.c _______________________________________________ Pkg-games-commits mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits

