The input word is guaranteed to be at most STRINGSIZE-1 in length.

One of the mangle operations involves duplicating the input word, resulting in
a string twice the length to be accommodated by both area variables.
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=835386
Last-Update: 2016-08-17

Gbp-Pq: Name overflow-processing-long-words.patch
This commit is contained in:
Howard Guo 2022-06-04 14:14:21 +08:00 committed by Lu zhiping
parent 6abdf68440
commit 9519f8323d
1 changed files with 2 additions and 3 deletions

View File

@ -434,9 +434,8 @@ Mangle(input, control) /* returns a pointer to a controlled Mangle */
{
int limit;
register char *ptr;
static char area[STRINGSIZE];
char area2[STRINGSIZE];
area[0] = '\0';
static char area[STRINGSIZE * 2] = {0};
char area2[STRINGSIZE * 2] = {0};
strcpy(area, input);
for (ptr = control; *ptr; ptr++)