aboutsummaryrefslogtreecommitdiff
path: root/games/openbor/files
diff options
context:
space:
mode:
authorJan Beich <jbeich@FreeBSD.org>2016-12-23 04:42:12 +0000
committerJan Beich <jbeich@FreeBSD.org>2016-12-23 04:42:12 +0000
commitbe4e994a2424d74a9c83c23c3ae79107f40dca89 (patch)
tree6610911d409c893f2a901a4e6f72b146d35f3640 /games/openbor/files
parent8b40a2586dcd9a2251b2a549df51e420b729a0c9 (diff)
downloadports-be4e994a2424d74a9c83c23c3ae79107f40dca89.tar.gz
ports-be4e994a2424d74a9c83c23c3ae79107f40dca89.zip
games/openbor: update to 3.0.r4420
Notes
Notes: svn path=/head/; revision=429223
Diffstat (limited to 'games/openbor/files')
-rw-r--r--games/openbor/files/patch-openbor.c33
-rw-r--r--games/openbor/files/patch-sdl_sdlport.c2
-rw-r--r--games/openbor/files/patch-source_ramlib_ram.c2
3 files changed, 32 insertions, 5 deletions
diff --git a/games/openbor/files/patch-openbor.c b/games/openbor/files/patch-openbor.c
index 4f1f134acf0b..2b9ebf433157 100644
--- a/games/openbor/files/patch-openbor.c
+++ b/games/openbor/files/patch-openbor.c
@@ -1,4 +1,6 @@
---- openbor.c.orig 2016-12-19 15:29:57 UTC
+Fix potential crashes found by ASan/Clang/GCC
+
+--- openbor.c.orig 2016-12-22 13:02:02 UTC
+++ openbor.c
@@ -5810,7 +5810,7 @@ s_collision_attack **collision_alloc_att
size_t alloc_size;
@@ -18,21 +20,42 @@
// Allocate memory and get pointer.
result = malloc(alloc_size);
-@@ -20480,7 +20480,7 @@ void common_dot()
+@@ -13933,7 +13933,7 @@ void generate_basemap(int map_index, flo
+
+ void load_level(char *filename)
+ {
+- char *buf;
++ char *buf = NULL;
+ size_t size, len, sblen;
+ ptrdiff_t pos, oldpos;
+ char *command;
+@@ -15210,6 +15210,11 @@ void bar(int x, int y, int value, int ma
+ return;
+ }
+
++ if (value < 0)
++ {
++ value = 0;
++ }
++
+ if (value > maxvalue)
+ {
+ value = maxvalue;
+@@ -20471,7 +20476,7 @@ void common_dot()
entity *eOpp; //Owner of dot effect.
s_collision_attack attack; //Attack struct.
- for(iIndex = 0; iIndex <= MAX_DOTS; iIndex++) //Loop through all DOT indexes.
-+ for(iIndex = 0; iIndex < MAX_DOTS; iIndex++) //Loop through all DOT indexes.
++ for(iIndex = 0; iIndex < MAX_DOTS; iIndex++) //Loop through all DOT indexes.
{
iDot_time = self->dot_time[iIndex]; //Get expire time.
iDot_cnt = self->dot_cnt[iIndex]; //Get next tick time.
-@@ -34617,7 +34617,7 @@ void keyboard_setup(int player)
+@@ -34607,7 +34612,7 @@ void keyboard_setup(int player)
strncpy(buttonnames[SDID_SPECIAL], "Special", 16);
strncpy(buttonnames[SDID_START], "Start", 16);
strncpy(buttonnames[SDID_SCREENSHOT], "Screenshot", 16);
- strncpy(buttonnames[SDID_ESC], "Exit", 16);
-+// strncpy(buttonnames[SDID_ESC], "Exit", 16);
++ //strncpy(buttonnames[SDID_ESC], "Exit", 16);
savesettings();
bothnewkeys = 0;
diff --git a/games/openbor/files/patch-sdl_sdlport.c b/games/openbor/files/patch-sdl_sdlport.c
index b092c843e344..4e02426b2ffa 100644
--- a/games/openbor/files/patch-sdl_sdlport.c
+++ b/games/openbor/files/patch-sdl_sdlport.c
@@ -1,3 +1,5 @@
+Store settings under ~/.openbor instead of current directory
+
--- sdl/sdlport.c.orig 2013-12-29 14:05:10 UTC
+++ sdl/sdlport.c
@@ -6,6 +6,11 @@
diff --git a/games/openbor/files/patch-source_ramlib_ram.c b/games/openbor/files/patch-source_ramlib_ram.c
index cf80e06758e7..5a32a492ed5c 100644
--- a/games/openbor/files/patch-source_ramlib_ram.c
+++ b/games/openbor/files/patch-source_ramlib_ram.c
@@ -1,3 +1,5 @@
+Implement Linux-like memory stats for BSDs
+
--- source/ramlib/ram.c.orig 2015-04-18 21:21:56 UTC
+++ source/ramlib/ram.c
@@ -25,6 +25,21 @@