Fossil SCM
Fix another problem with lappend and taint. See [forum:/forumpost/94b7485f464bd3a1|forum post 94b7485f4] for a description of the problem.
Commit
aa66767bac78b2b007899f0d7ca0664ae1e05f232cc233bb977f47f669c5c3fa
Parent
6476f287d381970…
1 file changed
+3
-1
M
src/th.c
+3
-1
| --- src/th.c | ||
| +++ src/th.c | ||
| @@ -1794,12 +1794,14 @@ | ||
| 1794 | 1794 | int hasSpecialChar = 0; /* Whitespace or {}[]'" */ |
| 1795 | 1795 | int hasEscapeChar = 0; /* '}' without matching '{' to the left or a '\\' */ |
| 1796 | 1796 | int nBrace = 0; |
| 1797 | 1797 | |
| 1798 | 1798 | output.zBuf = *pzList; |
| 1799 | - output.nBuf = *pnList; | |
| 1799 | + output.nBuf = TH1_LEN(*pnList); | |
| 1800 | 1800 | output.nBufAlloc = output.nBuf; |
| 1801 | + output.bTaint = 0; | |
| 1802 | + TH1_XFER_TAINT(output.bTaint, *pnList); | |
| 1801 | 1803 | |
| 1802 | 1804 | if( nElem<0 ){ |
| 1803 | 1805 | nElem = th_strlen(zElem); |
| 1804 | 1806 | }else{ |
| 1805 | 1807 | nElem = TH1_LEN(nElem); |
| 1806 | 1808 |
| --- src/th.c | |
| +++ src/th.c | |
| @@ -1794,12 +1794,14 @@ | |
| 1794 | int hasSpecialChar = 0; /* Whitespace or {}[]'" */ |
| 1795 | int hasEscapeChar = 0; /* '}' without matching '{' to the left or a '\\' */ |
| 1796 | int nBrace = 0; |
| 1797 | |
| 1798 | output.zBuf = *pzList; |
| 1799 | output.nBuf = *pnList; |
| 1800 | output.nBufAlloc = output.nBuf; |
| 1801 | |
| 1802 | if( nElem<0 ){ |
| 1803 | nElem = th_strlen(zElem); |
| 1804 | }else{ |
| 1805 | nElem = TH1_LEN(nElem); |
| 1806 |
| --- src/th.c | |
| +++ src/th.c | |
| @@ -1794,12 +1794,14 @@ | |
| 1794 | int hasSpecialChar = 0; /* Whitespace or {}[]'" */ |
| 1795 | int hasEscapeChar = 0; /* '}' without matching '{' to the left or a '\\' */ |
| 1796 | int nBrace = 0; |
| 1797 | |
| 1798 | output.zBuf = *pzList; |
| 1799 | output.nBuf = TH1_LEN(*pnList); |
| 1800 | output.nBufAlloc = output.nBuf; |
| 1801 | output.bTaint = 0; |
| 1802 | TH1_XFER_TAINT(output.bTaint, *pnList); |
| 1803 | |
| 1804 | if( nElem<0 ){ |
| 1805 | nElem = th_strlen(zElem); |
| 1806 | }else{ |
| 1807 | nElem = TH1_LEN(nElem); |
| 1808 |