Fossil SCM

Fix another problem with lappend and taint. See [forum:/forumpost/94b7485f464bd3a1|forum post 94b7485f4] for a description of the problem.

drh 2025-04-22 19:34 trunk
Commit aa66767bac78b2b007899f0d7ca0664ae1e05f232cc233bb977f47f669c5c3fa
1 file changed +3 -1
+3 -1
--- src/th.c
+++ src/th.c
@@ -1794,12 +1794,14 @@
17941794
int hasSpecialChar = 0; /* Whitespace or {}[]'" */
17951795
int hasEscapeChar = 0; /* '}' without matching '{' to the left or a '\\' */
17961796
int nBrace = 0;
17971797
17981798
output.zBuf = *pzList;
1799
- output.nBuf = *pnList;
1799
+ output.nBuf = TH1_LEN(*pnList);
18001800
output.nBufAlloc = output.nBuf;
1801
+ output.bTaint = 0;
1802
+ TH1_XFER_TAINT(output.bTaint, *pnList);
18011803
18021804
if( nElem<0 ){
18031805
nElem = th_strlen(zElem);
18041806
}else{
18051807
nElem = TH1_LEN(nElem);
18061808
--- 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

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button