mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-09 19:13:26 +03:00
bloodspilot-server: fix build
This commit is contained in:
parent
e37af90747
commit
09972fbc5a
2 changed files with 41 additions and 0 deletions
40
pkgs/games/xpilot/bloodspilot-server-strcpy-fix.patch
Normal file
40
pkgs/games/xpilot/bloodspilot-server-strcpy-fix.patch
Normal file
|
@ -0,0 +1,40 @@
|
|||
Fortify catches a possible strcpy overcopy, throw more space at it
|
||||
|
||||
--- a/src/server/contact.c 2010-05-24 14:51:41.000000000 +0200
|
||||
+++ b/src/server/contact.c 2025-03-23 12:15:36.426805646 +0100
|
||||
@@ -58,11 +58,11 @@
|
||||
|
||||
struct queued_player {
|
||||
struct queued_player *next;
|
||||
- char real_name[MAX_CHARS];
|
||||
- char nick_name[MAX_CHARS];
|
||||
- char disp_name[MAX_CHARS];
|
||||
- char host_name[MAX_CHARS];
|
||||
- char host_addr[24];
|
||||
+ char real_name[MAX_CHARS + 32];
|
||||
+ char nick_name[MAX_CHARS + 32];
|
||||
+ char disp_name[MAX_CHARS + 32];
|
||||
+ char host_name[MAX_CHARS + 32];
|
||||
+ char host_addr[1056];
|
||||
int32_t port;
|
||||
team_t *team;
|
||||
uint32_t version;
|
||||
@@ -271,12 +271,12 @@
|
||||
uint32_t my_magic;
|
||||
uint16_t port;
|
||||
char ch;
|
||||
- char real_name[MAX_CHARS];
|
||||
- char disp_name[MAX_CHARS];
|
||||
- char nick_name[MAX_CHARS];
|
||||
- char host_name[MAX_CHARS];
|
||||
- char host_addr[24];
|
||||
- char str[MSG_LEN];
|
||||
+ char real_name[MAX_CHARS + 32 ];
|
||||
+ char disp_name[MAX_CHARS + 32 ];
|
||||
+ char nick_name[MAX_CHARS + 32 ];
|
||||
+ char host_name[MAX_CHARS + 32 ];
|
||||
+ char host_addr[1056];
|
||||
+ char str[MSG_LEN + 32];
|
||||
|
||||
/*
|
||||
* Someone connected to us, now try and decipher the message :)
|
|
@ -20,6 +20,7 @@ stdenv.mkDerivation rec {
|
|||
|
||||
patches = [
|
||||
./server-gcc5.patch
|
||||
./bloodspilot-server-strcpy-fix.patch
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue