mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-10 01:02:56 +03:00
Avoid an infinite loop when an unexpected character is being decoded by kvvfs
FossilOrigin-Name: 6909195f77b50650982a6afd9d72b3a6ac9aff1f86c653fa18d0d9bf64e9bd8f
This commit is contained in:
@@ -1 +1 @@
|
|||||||
eed1e030722deb24674e7c2d165a2a359576c6bb5769d3bdd5fa645bc0f2ecc7
|
6909195f77b50650982a6afd9d72b3a6ac9aff1f86c653fa18d0d9bf64e9bd8f
|
@@ -418,7 +418,7 @@ static int kvvfsDecode(const char *a, char *aOut, int nOut){
|
|||||||
memset(&aOut[j], 0, n);
|
memset(&aOut[j], 0, n);
|
||||||
j += n;
|
j += n;
|
||||||
c = aIn[i];
|
c = aIn[i];
|
||||||
if( c==0 ) break;
|
if( c==0 || mult==1 ) break; /* progress stalled if mult==1 */
|
||||||
}else{
|
}else{
|
||||||
aOut[j] = c<<4;
|
aOut[j] = c<<4;
|
||||||
c = kvvfsHexValue[aIn[++i]];
|
c = kvvfsHexValue[aIn[++i]];
|
||||||
|
Reference in New Issue
Block a user