• 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/bash44-012.patch
Peter KorsgaardPeter Korsgaard committed 54a9495123108 Feb 2017
Raw file
Source viewDiff to previous
xxxxxxxxxx
 
1
From https://ftp.gnu.org/gnu/bash/bash-4.4-patches/bash44-012
2
​
3
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
4
​
5
                 BASH PATCH REPORT
6
                 =================
7
​
8
Bash-Release:   4.4
9
Patch-ID:   bash44-012
10
​
11
Bug-Reported-by:    Clark Wang <dearvoid@gmail.com>
12
Bug-Reference-ID:   <CADv8-ojttPUFOZXqbjsvy83LfaJtQKZ5qejGdF6j0VJ3vtrYOA@mail.gmail.com>
13
Bug-Reference-URL:  http://lists.gnu.org/archive/html/bug-bash/2016-11/msg00106.html
14
​
15
Bug-Description:
16
​
17
When -N is used, the input is not supposed to be split using $IFS, but
18
leading and trailing IFS whitespace was still removed.
19
​
20
Patch (apply with `patch -p0'):
21
​
22
*** bash-4.4-patched/subst.c    2017-01-20 14:22:01.000000000 -0500
23
--- b/subst.c   2017-01-25 13:43:22.000000000 -0500
24
***************
25
*** 2826,2834 ****
26
  /* Parse a single word from STRING, using SEPARATORS to separate fields.
27
     ENDPTR is set to the first character after the word.  This is used by
28
!    the `read' builtin.  This is never called with SEPARATORS != $IFS;
29
!    it should be simplified.
30
  
31
     XXX - this function is very similar to list_string; they should be
32
     combined - XXX */
33
  char *
34
  get_word_from_string (stringp, separators, endptr)
35
--- b/2826,2838 ----
36
  /* Parse a single word from STRING, using SEPARATORS to separate fields.
37
     ENDPTR is set to the first character after the word.  This is used by
38
!    the `read' builtin.
39
!    
40
!    This is never called with SEPARATORS != $IFS, and takes advantage of that.
41
  
42
     XXX - this function is very similar to list_string; they should be
43
     combined - XXX */
44
+ 
45
+ #define islocalsep(c) (local_cmap[(unsigned char)(c)] != 0)
46
+ 
47
  char *
48
  get_word_from_string (stringp, separators, endptr)
49
***************
50
*** 2838,2841 ****
51
--- b/2842,2846 ----
52
    char *current_word;
53
    int sindex, sh_style_split, whitesep, xflags;
54
+   unsigned char local_cmap[UCHAR_MAX+1];  /* really only need single-byte chars here */
55
    size_t slen;
56
  
57
***************
58
*** 2847,2854 ****
59
                 separators[2] == '\n' &&
60
                 separators[3] == '\0';
61
!   for (xflags = 0, s = ifs_value; s && *s; s++)
62
      {
63
        if (*s == CTLESC) xflags |= SX_NOCTLESC;
  • 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.