From 385f1c1e3e94d0f3e41fb63a76601a7f269368b6 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sun, 14 Dec 2025 13:58:09 +0100 Subject: [PATCH 1/4] =?UTF-8?q?Verzauberungen,=20die=20eigene=20Daten=20sp?= =?UTF-8?q?eichern,=20m=C3=BCssen=20Speicher=20reservieren,=20in=20den=20s?= =?UTF-8?q?ie=20sie=20laden=20(null-pointer=20crash).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/kernel/version.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/kernel/version.c b/src/kernel/version.c index 56acac4fb..b017fdb12 100644 --- a/src/kernel/version.c +++ b/src/kernel/version.c @@ -8,7 +8,7 @@ #ifndef ERESSEA_VERSION /* the version number, if it was not passed to make with -D */ -#define ERESSEA_VERSION "30.4.0" +#define ERESSEA_VERSION "31.1.0" #endif const char *eressea_version(void) { From 54c2e6e3e0407230921c71ac6daf18231a99c5a7 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sun, 14 Dec 2025 19:35:35 +0100 Subject: [PATCH 2/4] update announce mailing list after the turn --- process/CMakeLists.txt | 2 +- process/cron/run-eressea.cron | 1 + process/updatelist.sh | 9 +++++++++ 3 files changed, 11 insertions(+), 1 deletion(-) create mode 100755 process/updatelist.sh diff --git a/process/CMakeLists.txt b/process/CMakeLists.txt index 106c4c864..7039bf127 100644 --- a/process/CMakeLists.txt +++ b/process/CMakeLists.txt @@ -1,5 +1,5 @@ install(PROGRAMS create-orders backup-box backup-onedrive - run-turn send-zip-report + run-turn send-zip-report updatelist.sh send-bz2-report compress.py compress.sh epasswd.py accept-orders.py getemail.py checkpasswd.py sendreport.sh sendreports.sh orders-accept DESTINATION bin) diff --git a/process/cron/run-eressea.cron b/process/cron/run-eressea.cron index f72d37482..11993132d 100755 --- a/process/cron/run-eressea.cron +++ b/process/cron/run-eressea.cron @@ -86,6 +86,7 @@ backup BACKUP "$GAME" "$TURN" upload "$BACKUP" rm -f execute.lock "$BIN/run-turn" "$GAME" "$TURN" +"$BIN/updatelist.sh" "$TURN" touch execute.lock (( NEXTTURN=TURN+1 )) || true diff --git a/process/updatelist.sh b/process/updatelist.sh new file mode 100755 index 000000000..cf63df8e1 --- /dev/null +++ b/process/updatelist.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +TURN=$1 +LIST=eressea-announce@kn-bremen.de +awk '{ if ($2 =="'$TURN'") print $5 }' deadlog.txt |\ + mailman delmembers -f- -l$LIST +tail reports/reports.txt | cut -d: -f2 | sed -e 's/email=//' | \ + mailman addmembers - $LIST + From 88fceb3a5ce2a4fb7682b2f8a55fafabdd24ecb2 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sun, 11 Jan 2026 18:55:30 +0100 Subject: [PATCH 3/4] fix some minor coverity finds. --- src/bind_region.c | 16 +++++++++------- src/kernel/connection.c | 7 +++++-- src/main.c | 6 +++--- src/summary.c | 16 +++++++++------- 4 files changed, 26 insertions(+), 19 deletions(-) diff --git a/src/bind_region.c b/src/bind_region.c index 782900075..c80eb7efd 100644 --- a/src/bind_region.c +++ b/src/bind_region.c @@ -273,15 +273,17 @@ static int tolua_region_has_border(lua_State *L) if (btype) { direction_t dir = (direction_t)tolua_tonumber(L, 3, 0); region *r2 = rconnect(r, dir); - connection *b; - for (b = get_borders(r, r2); b; b = b->next) { - if (b->type == btype) { - lua_pushboolean(L, true); - return 1; + if (r2) { + connection *b; + for (b = get_borders(r, r2); b; b = b->next) { + if (b->type == btype) { + lua_pushboolean(L, true); + return 1; + } } + lua_pushboolean(L, false); + return 1; } - lua_pushboolean(L, false); - return 1; } return 0; } diff --git a/src/kernel/connection.c b/src/kernel/connection.c index f5dfd43d1..8a6740c78 100644 --- a/src/kernel/connection.c +++ b/src/kernel/connection.c @@ -100,8 +100,11 @@ static connection **get_borders_i(const region * r1, const region * r2) connection *get_borders(const region * r1, const region * r2) { - connection **bp = get_borders_i(r1, r2); - return *bp; + if (r1 && r2) { + connection **bp = get_borders_i(r1, r2); + return *bp; + } + return NULL; } connection *border_create(region *from) diff --git a/src/main.c b/src/main.c index 9d8973225..a3de84ae9 100644 --- a/src/main.c +++ b/src/main.c @@ -239,7 +239,7 @@ static int parse_args(int argc, char **argv) case 'l': i = get_arg(argc, argv, 2, i, &arg, NULL); if (arg) { - log_flags = arg ? atoi(arg) : 0xff; + log_flags = atoi(arg); } else { return usage(argv[0], NULL); } @@ -263,7 +263,7 @@ static int parse_args(int argc, char **argv) case 'w': i = get_arg(argc, argv, 2, i, &arg, NULL); if (arg) { - bcrypt_workfactor = arg ? atoi(arg) : 0xff; + bcrypt_workfactor = atoi(arg); } else { return usage(argv[0], NULL); } @@ -274,7 +274,7 @@ static int parse_args(int argc, char **argv) case 'v': i = get_arg(argc, argv, 2, i, &arg, NULL); if (arg) { - verbosity = arg ? atoi(arg) : 0xff; + verbosity = atoi(arg); } break; case 'h': diff --git a/src/summary.c b/src/summary.c index b39d0df79..a98f74a5e 100644 --- a/src/summary.c +++ b/src/summary.c @@ -248,7 +248,6 @@ static int cmp_nmr_faction(const void *a, const void *b) static void report_nmrs(FILE *F, int timeout) { nmr_faction *nmrs = NULL; - size_t len, i; faction *f; for (f = factions; f; f = f->next) { if (turn - 1 - f->lastorders > 0) { @@ -257,13 +256,16 @@ static void report_nmrs(FILE *F, int timeout) nmr->nmr = turn - 1 - f->lastorders; } } - len = arrlen(nmrs); - qsort(nmrs, len, sizeof(struct nmr_faction), cmp_nmr_faction); - fprintf(F, "\n\nFactions with NMRs:\n"); - for (i = 0; i != len; ++i) { - out_faction(F, nmrs[i].f); + if (nmrs) { + size_t len, i; + len = arrlen(nmrs); + qsort(nmrs, len, sizeof(struct nmr_faction), cmp_nmr_faction); + fprintf(F, "\n\nFactions with NMRs:\n"); + for (i = 0; i != len; ++i) { + out_faction(F, nmrs[i].f); + } + arrfree(nmrs); } - arrfree(nmrs); } void report_summary(const summary * s, bool full) From 62e14e7aa744b4eddf4e2dc0868ccb294b81670e Mon Sep 17 00:00:00 2001 From: Steffen Mecke Date: Thu, 15 Jan 2026 12:55:39 +0100 Subject: [PATCH 4/4] fixed empty units cannot be ship owners --- src/kernel/ship.c | 2 +- src/kernel/ship.test.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/kernel/ship.c b/src/kernel/ship.c index 5f732aafb..623fa4b83 100644 --- a/src/kernel/ship.c +++ b/src/kernel/ship.c @@ -581,7 +581,7 @@ unit *ship_owner(const ship * sh) { if (sh->number > 0) { unit *owner = sh->_owner; - if (!owner || owner->ship != sh) { + if (!owner || owner->ship != sh || owner->number <= 0) { unit * heir = ship_owner_ex(sh, owner ? owner->faction : NULL); return (heir && heir->number > 0) ? heir : NULL; } diff --git a/src/kernel/ship.test.c b/src/kernel/ship.test.c index 4436e43bb..7b1681da9 100644 --- a/src/kernel/ship.test.c +++ b/src/kernel/ship.test.c @@ -187,7 +187,7 @@ static void test_shipowner_goes_to_other_when_empty(CuTest * tc) u_set_ship(u, sh); u_set_ship(u2, sh); CuAssertPtrEquals(tc, u, ship_owner(sh)); - leave_ship(u); + u->number = 0; CuAssertPtrEquals(tc, u2, ship_owner(sh)); test_teardown(); }