From b5aa0ab2da5c926c5cc8bc4ce2b3ea0cbe4b1bf8 Mon Sep 17 00:00:00 2001 From: Russ Allbery Date: Sun, 21 Jul 2019 11:39:54 -0700 Subject: Increase static UI buffers * Increase the size of static buffers used to build messages during program start so that the Spanish translation doesn't overflow a buffer. (Closes: #932351) --- debian/changelog | 8 ++++ ...-Expand-size-of-buffers-for-eval-messages.patch | 48 ++++++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 57 insertions(+) create mode 100644 debian/patches/0002-Expand-size-of-buffers-for-eval-messages.patch diff --git a/debian/changelog b/debian/changelog index f0e862d..04dc65e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +gnubg (1.06.002-2) UNRELEASED; urgency=medium + + * Increase the size of static buffers used to build messages during + program start so that the Spanish translation doesn't overflow a + buffer. (Closes: #932351) + + -- Russ Allbery Sun, 21 Jul 2019 11:39:46 -0700 + gnubg (1.06.002-1) unstable; urgency=medium * New upstream release. diff --git a/debian/patches/0002-Expand-size-of-buffers-for-eval-messages.patch b/debian/patches/0002-Expand-size-of-buffers-for-eval-messages.patch new file mode 100644 index 0000000..086e700 --- /dev/null +++ b/debian/patches/0002-Expand-size-of-buffers-for-eval-messages.patch @@ -0,0 +1,48 @@ +From: Russ Allbery +Date: Sun, 21 Jul 2019 11:35:00 -0700 +Subject: Expand size of buffers for eval messages + +CommandSetEvalCubeful, CommandSetEvalPrune, and +CommandSetEvalDeterministic used static buffers of 128 bytes for +displaying messages, but the Spanish translation for at least +CommandSetEvalDeterministic used more space than the length of +that buffer. This, in turn, triggered a bounds checking error +during program start. + +Double the length of the buffers to work around the immediate +problem. +--- + set.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/set.c b/set.c +index 4e2e826..09f43e8 100644 +--- a/set.c ++++ b/set.c +@@ -1024,7 +1024,7 @@ extern void + CommandSetEvalCubeful(char *sz) + { + +- char asz[2][128], szCommand[64]; ++ char asz[2][256], szCommand[64]; + int f = pecSet->fCubeful; + + sprintf(asz[0], _("%s will use cubeful evaluation.\n"), szSet); +@@ -1038,7 +1038,7 @@ extern void + CommandSetEvalPrune(char *sz) + { + +- char asz[2][128], szCommand[64]; ++ char asz[2][256], szCommand[64]; + int f = pecSet->fUsePrune; + + sprintf(asz[0], _("%s will use pruning.\n"), szSet); +@@ -1052,7 +1052,7 @@ extern void + CommandSetEvalDeterministic(char *sz) + { + +- char asz[2][128], szCommand[64]; ++ char asz[2][256], szCommand[64]; + int f = pecSet->fDeterministic; + + sprintf(asz[0], _("%s will use deterministic noise.\n"), szSet); diff --git a/debian/patches/series b/debian/patches/series index 9dc2ee0..404c9f5 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1 +1,2 @@ 0001-Support-finding-databases-in-var-as-well-as-usr.patch +0002-Expand-size-of-buffers-for-eval-messages.patch -- cgit v1.2.3