diff options
author | drh <> | 2023-12-11 02:39:11 +0000 |
---|---|---|
committer | drh <> | 2023-12-11 02:39:11 +0000 |
commit | b89e64d82231c3be84c5b38dd07a0ebf347ccbcb (patch) | |
tree | 832a353f3fce43466a2b951ea28cbc3da1b2e239 /src/json.c | |
parent | bfa0de86e6a530550bb77cc4ff1e751b0d6d3cbb (diff) | |
download | sqlite-b89e64d82231c3be84c5b38dd07a0ebf347ccbcb.tar.gz sqlite-b89e64d82231c3be84c5b38dd07a0ebf347ccbcb.zip |
Fix a potential use of uninitialized value in json_valid() with 2nd
argument of 8.
FossilOrigin-Name: fa102036fe46eeb71b7df3e265be1935ae5c78e0b939b08841bcfb8abadbc77a
Diffstat (limited to 'src/json.c')
-rw-r--r-- | src/json.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/json.c b/src/json.c index 6bb13941d..71a1b789a 100644 --- a/src/json.c +++ b/src/json.c @@ -3972,6 +3972,7 @@ static void jsonValidFunc( if( sx.eErr & JSTRING_OOM ) oom = 1; if( sx.eErr==0 ){ memset(&px, 0, sizeof(px)); + jsonStringTerminate(&sx); px.zJson = sx.zBuf; px.nJson = sx.nUsed; if( jsonXlateTextToBlob(&px, 0)==px.nJson ){ |