1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-08 14:02:16 +03:00

Avoid an infinite loop when an unexpected character is being decoded by kvvfs

FossilOrigin-Name: 6909195f77b50650982a6afd9d72b3a6ac9aff1f86c653fa18d0d9bf64e9bd8f
This commit is contained in:
peter.d.reid
2022-12-31 05:19:45 +00:00
parent 12e1eb344f
commit 576fe9035b
3 changed files with 10 additions and 2075 deletions

View File

@@ -418,7 +418,7 @@ static int kvvfsDecode(const char *a, char *aOut, int nOut){
memset(&aOut[j], 0, n);
j += n;
c = aIn[i];
if( c==0 ) break;
if( c==0 || mult==1 ) break; /* progress stalled if mult==1 */
}else{
aOut[j] = c<<4;
c = kvvfsHexValue[aIn[++i]];