freeciv-3.0: Update to 3.0.10

Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
This commit is contained in:
Marko Lindqvist
2024-02-10 15:25:35 +02:00
parent e9caf1ca3b
commit c8c4835977
3 changed files with 10 additions and 47 deletions

View File

@@ -1,36 +0,0 @@
From 03df29aaa12892b851d13f291977be3e7679e560 Mon Sep 17 00:00:00 2001
From: Marko Lindqvist <cazfi74@gmail.com>
Date: Mon, 27 Nov 2023 01:29:52 +0200
Subject: [PATCH 2/3] Reserve space for terminating NULL on astr_buffer
Growing the buffer was always considered a failure,
as it was one byte too small even after giving out
the requested size.
Reported by Giacomo Mulas
Debian Bug#1056916
Signed-off-by: Marko Lindqvist <cazfi74@gmail.com><
---
utility/astring.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/utility/astring.c b/utility/astring.c
index 44d39f582c..cfcb67565f 100644
--- a/utility/astring.c
+++ b/utility/astring.c
@@ -234,8 +234,8 @@ static inline void astr_vadd_at(struct astring *astr, size_t at,
va_copy(copy, ap);
req_len = fc_vsnprintf(buffer, buffer_size, format, ap);
- if (req_len > buffer_size) {
- buffer = astr_buffer_grow(req_len, &buffer_size);
+ if (req_len + 1 > buffer_size) {
+ buffer = astr_buffer_grow(req_len + 1, &buffer_size);
/* Even if buffer is *still* too small, we fill what we can */
req_len = fc_vsnprintf(buffer, buffer_size, format, copy);
if (req_len > buffer_size) {
--
2.42.0

View File

@@ -0,0 +1,10 @@
require freeciv-qt5.inc
SRC_URI += "\
${SOURCEFORGE_MIRROR}/freeciv/freeciv-${PV}.tar.xz \
file://allow-root.patch \
file://dummy-qtver.patch \
"
SRC_URI[sha256sum] = "c185c8ea0d6a2e974a5ad12fb837ca3ceb9aed3e7e884355f01035f5e779d23c"

View File

@@ -1,11 +0,0 @@
require freeciv-qt5.inc
SRC_URI += "\
${SOURCEFORGE_MIRROR}/freeciv/freeciv-${PV}.tar.xz \
file://allow-root.patch \
file://dummy-qtver.patch \
file://0002-Reserve-space-for-terminating-NULL-on-astr_buffer.patch \
"
SRC_URI[sha256sum] = "16c46a9c378b4a511c1e3d3a7c435a78230a432d8b852202aaf5d5d584962742"