~ubuntu-branches/ubuntu/trusty/expect/trusty

« back to all changes in this revision

Viewing changes to debian/patches/21-match.patch

  • Committer: Bazaar Package Importer
  • Author(s): Sergei Golovan
  • Date: 2010-10-27 10:29:04 UTC
  • Revision ID: james.westby@ubuntu.com-20101027102904-d7yhvj9ah7q72rww
Tags: 5.44.1.15-4
Added patch by upstream which fixes crash during exact string matching
in expect command if the search pattern contains non-ASCII characters.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Author: Upstream
 
2
Description: Patch fixes segfault for matching exact string with
 
3
 non-ASCII characters in it.
 
4
Bug: https://sourceforge.net/tracker/?func=detail&aid=3095935&group_id=13179&atid=313179
 
5
 
 
6
--- expect-5.44.1.15.orig/expect.c
 
7
+++ expect-5.44.1.15/expect.c
 
8
@@ -946,6 +946,9 @@
 
9
        expDiagLogU(expPrintify(Tcl_GetString(e->pat)));
 
10
        expDiagLog("\"? ");
 
11
        if (p) {
 
12
+           /* Bug 3095935. Go from #bytes to #chars */
 
13
+           patLength = Tcl_NumUtfChars (pat, patLength);
 
14
+
 
15
            e->simple_start = p - str;
 
16
            o->e = e;
 
17
            o->matchlen = patLength;