diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/os_unix.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/os_unix.c b/src/os_unix.c index 49f6563b1..e5103856b 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -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); |