• 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/0031-patchlevel-31.patch
Gustavo ZacariasGustavo Zacarias committed 47df048f8d118 Mar 2015
Raw file
Source viewDiff to previous
xxxxxxxxxx
!             return (bind_variable_internal (nameref_cell (nv), value, nvc->table, 0, flags|ASS_FROMREF));
 
1
From http://ftp.gnu.org/pub/gnu/bash/bash-4.3-patches/bash43-031
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-031
10
​
11
Bug-Reported-by:    lolilolicon <lolilolicon@gmail.com>
12
Bug-Reference-ID:   <CAMtVo_Nz=32Oq=zWTb6=+8gUNXOo2rRvud1W4oPnA-cgVk_ZqQ@mail.gmail.com>
13
Bug-Reference-URL:  http://lists.gnu.org/archive/html/bug-bash/2014-08/msg00139.html
14
​
15
Bug-Description:
16
​
17
The new nameref assignment functionality introduced in bash-4.3 did not perform
18
enough validation on the variable value and would create variables with
19
invalid names.
20
​
21
Patch (apply with `patch -p0'):
22
​
23
*** a/bash-4.3-patched/subst.h  2014-01-11 21:02:27.000000000 -0500
24
--- b/subst.h   2014-09-01 12:16:56.000000000 -0400
25
***************
26
*** 48,51 ****
27
--- 48,52 ----
28
  #define ASS_MKGLOBAL  0x0008  /* force global assignment */
29
  #define ASS_NAMEREF   0x0010  /* assigning to nameref variable */
30
+ #define ASS_FROMREF   0x0020  /* assigning from value of nameref variable */
31
  
32
  /* Flags for the string extraction functions. */
33
*** a/bash-4.3-patched/variables.c  2014-05-15 08:26:50.000000000 -0400
34
--- b/variables.c   2014-09-01 14:37:44.000000000 -0400
35
***************
36
*** 2504,2511 ****
37
       int hflags, aflags;
38
  {
39
!   char *newval;
40
    SHELL_VAR *entry;
41
  
42
    entry = (hflags & HASH_NOSRCH) ? (SHELL_VAR *)NULL : hash_lookup (name, table);
43
    /* Follow the nameref chain here if this is the global variables table */
44
    if (entry && nameref_p (entry) && (invisible_p (entry) == 0) && table == global_variables->table)
45
--- 2566,2590 ----
46
       int hflags, aflags;
47
  {
48
!   char *newname, *newval;
49
    SHELL_VAR *entry;
50
+ #if defined (ARRAY_VARS)
51
+   arrayind_t ind;
52
+   char *subp;
53
+   int sublen;
54
+ #endif
55
  
56
+   newname = 0;
57
+ #if defined (ARRAY_VARS)
58
+   if ((aflags & ASS_FROMREF) && (hflags & HASH_NOSRCH) == 0 && valid_array_reference (name))
59
+     {
60
+       newname = array_variable_name (name, &subp, &sublen);
61
+       if (newname == 0)
62
+   return (SHELL_VAR *)NULL;   /* XXX */
63
+       entry = hash_lookup (newname, table);
  • 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.