Package: gettext / 0.19.3-2

06-msgfilter-fix-read-buffer-allocation Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
From: Daiki Ueno <ueno@gnu.org>
Subject: Fix read buffer allocation for empty input
X-Debian-version: 0.19.3-2

--- a/gettext-tools/src/msgfilter.c
+++ b/gettext-tools/src/msgfilter.c
@@ -554,7 +554,7 @@
 
   if (l->length == l->allocated)
     {
-      l->allocated = l->allocated + (l->allocated >> 1);
+      l->allocated = l->allocated + (l->allocated >> 1) + 1;
       l->result = (char *) xrealloc (l->result, l->allocated);
     }
   *num_bytes_p = l->allocated - l->length;