mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-12 13:01:09 +03:00
Fix a problem in xFullPathname for the unix VFS. The problem was found by
Kostya Serebryany using libFuzzer. FossilOrigin-Name: bb1e2c4df0b81327923f121dd6c002845486a314
This commit is contained in:
@@ -5981,7 +5981,9 @@ static int unixFullPathname(
|
||||
** truncated to make it fit. This is Ok, as SQLite refuses to open any
|
||||
** file for which this function returns a full path larger than (nOut-8)
|
||||
** bytes in size. */
|
||||
if( zOut[0]!='/' ){
|
||||
testcase( nByte==nOut-5 );
|
||||
testcase( nByte==nOut-4 );
|
||||
if( zOut[0]!='/' && nByte<nOut-4 ){
|
||||
int nCwd;
|
||||
int nRem = nOut-nByte-1;
|
||||
memmove(&zOut[nRem], zOut, nByte+1);
|
||||
|
||||
Reference in New Issue
Block a user