mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-06 17:18:32 +00:00
patch(1): avoid signed integer overflow when debugging.
Integer i is used to index p_end of type LINENUM (actually long). Match the types. MFC after: 5 days
This commit is contained in:
parent
a4c2c79097
commit
2c4eed4723
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=298530
|
@ -1142,7 +1142,7 @@ another_hunk(void)
|
|||
say("Not enough memory to swap next hunk!\n");
|
||||
#ifdef DEBUGGING
|
||||
if (debug & 2) {
|
||||
int i;
|
||||
LINENUM i;
|
||||
char special;
|
||||
|
||||
for (i = 0; i <= p_end; i++) {
|
||||
|
@ -1150,7 +1150,7 @@ another_hunk(void)
|
|||
special = '^';
|
||||
else
|
||||
special = ' ';
|
||||
fprintf(stderr, "%3d %c %c %s", i, p_char[i],
|
||||
fprintf(stderr, "%3ld %c %c %s", i, p_char[i],
|
||||
special, p_line[i]);
|
||||
fflush(stderr);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue