1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-09 14:21:03 +03:00

Fix a potential use of uninitialized value in json_valid() with 2nd

argument of 8.

FossilOrigin-Name: fa102036fe46eeb71b7df3e265be1935ae5c78e0b939b08841bcfb8abadbc77a
This commit is contained in:
drh
2023-12-11 02:39:11 +00:00
parent bfa0de86e6
commit b89e64d822
3 changed files with 8 additions and 7 deletions

View File

@@ -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 ){