]> git.pld-linux.org Git - packages/expect.git/blame - expect-5.45-match-gt-numchars-segfault.patch
- updated to 5.45.4
[packages/expect.git] / expect-5.45-match-gt-numchars-segfault.patch
CommitLineData
dade3e15
AM
1diff -up expect5.45/expect.c.orig expect5.45/expect.c
2--- expect5.45/expect.c.orig 2012-02-06 14:15:13.469490744 +0100
3+++ expect5.45/expect.c 2012-02-06 14:16:23.596837896 +0100
4@@ -2363,7 +2363,12 @@ expMatchProcess(
5
6 /* "!e" means no case matched - transfer by default */
7 if (!e || e->transfer) {
8- int remainder = numchars-match;
9+ int remainder;
10+ if (match > numchars) {
11+ match = numchars;
12+ eo->matchlen = match;
13+ }
14+ remainder = numchars-match;
15 /* delete matched chars from input buffer */
16 esPtr->printed -= match;
17 if (numchars != 0) {
This page took 0.544418 seconds and 4 git commands to generate.