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

Fix a potential buffer overrun due to corrupt JSONB.

FossilOrigin-Name: 5cbb861fc6cb7421a81c957ba9d576e0ae92cb4ed725cdb539b364d66f4ee145
This commit is contained in:
drh
2023-10-10 18:32:14 +00:00
parent 064c1688da
commit d88f378c7d
3 changed files with 8 additions and 8 deletions

View File

@@ -1124,7 +1124,7 @@ static void jsonReturnFromNode(
assert( pNode->eU==1 );
to_double:
z = pNode->u.zJContent;
sqlite3AtoF(z, &r, sqlite3Strlen30(z), SQLITE_UTF8);
sqlite3AtoF(z, &r, pNode->n, SQLITE_UTF8);
sqlite3_result_double(pCtx, r);
break;
}