• Skip to sidebar navigation
  • Skip to content

Bitbucket

  • More
    ProjectsRepositories
  • Help
    • Online help
    • Learn Git
    • Welcome to Bitbucket
    • Keyboard shortcuts
  • Log In
Alexander Dahl
  1. Alexander Dahl

buildroot

Public
Actions
  • Clone
  • Compare

Learn more about cloning repositories

You have read-only access

Navigation
  • Source
  • Commits
  • Branches
  • All Branches Graph
  • Forks
  1. Alexander Dahl
  2. buildroot

Source

buildroot/package/bash/0041-patchlevel-41.patch
Gustavo ZacariasGustavo Zacarias committed 4a37f3316cc07 Jan 2016
Raw file
Source viewDiff to previous
xxxxxxxxxx
 
1
From http://ftp.gnu.org/pub/gnu/bash/bash-4.3-patches/bash43-041
2
​
3
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
4
​
5
                 BASH PATCH REPORT
6
                 =================
7
​
8
Bash-Release:   4.3
9
Patch-ID:   bash43-041
10
​
11
Bug-Reported-by:    Hanno Böck <hanno@hboeck.de>
12
Bug-Reference-ID:   <20150623131106.6f111da9@pc1>, <20150707004640.0e61d2f9@pc1>
13
Bug-Reference-URL:  http://lists.gnu.org/archive/html/bug-bash/2015-06/msg00089.html,
14
            http://lists.gnu.org/archive/html/bug-bash/2015-07/msg00018.html
15
​
16
Bug-Description:
17
​
18
There are several out-of-bounds read errors that occur when completing command
19
lines where assignment statements appear before the command name.  The first
20
two appear only when programmable completion is enabled; the last one only
21
happens when listing possible completions.
22
​
23
Patch (apply with `patch -p0'):
24
​
25
*** a/bash-4.3.40/bashline.c    2014-12-29 14:39:43.000000000 -0500
26
--- b/bashline.c    2015-08-12 10:21:58.000000000 -0400
27
***************
28
*** 1469,1476 ****
29
--- 1469,1489 ----
30
        os = start;
31
        n = 0;
32
+       was_assignment = 0;
33
        s = find_cmd_start (os);
34
        e = find_cmd_end (end);
35
        do
36
    {
37
+     /* Don't read past the end of rl_line_buffer */
38
+     if (s > rl_end)
39
+       {
40
+         s1 = s = e1;
41
+         break;
42
+       }
43
+     /* Or past point if point is within an assignment statement */
44
+     else if (was_assignment && s > rl_point)
45
+       {
46
+         s1 = s = e1;
47
+         break;
48
+       }
49
      /* Skip over assignment statements preceding a command name.  If we
50
         don't find a command name at all, we can perform command name
51
*** a/bash-4.3.40/lib/readline/complete.c   2013-10-14 09:27:10.000000000 -0400
52
--- b/lib/readline/complete.c   2015-07-31 09:34:39.000000000 -0400
53
***************
54
*** 690,693 ****
55
--- 690,695 ----
56
    if (temp == 0 || *temp == '\0')
57
      return (pathname);
58
+   else if (temp[1] == 0 && temp == pathname)
59
+     return (pathname);
60
    /* If the basename is NULL, we might have a pathname like '/usr/src/'.
61
       Look for a previous slash and, if one is found, return the portion
62
*** a/bash-4.3/patchlevel.h 2012-12-29 10:47:57.000000000 -0500
63
--- b/patchlevel.h  2014-03-20 20:01:28.000000000 -0400
  • Git repository management for enterprise teams powered by Atlassian Bitbucket
  • Atlassian Bitbucket v6.7.2
  • Documentation
  • Request a feature
  • About
  • Contact Atlassian
Atlassian

Everything looks good. We'll let you know here if there's anything you should know about.