1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-10-27 08:52:26 +03:00

Handle failures of getcwd() without segfaulting. Ticket #1274. (CVS 2490)

FossilOrigin-Name: c1691004d6d81b683a4ca5b1723c0de8b9b4e376
This commit is contained in:
drh
2005-06-06 15:06:39 +00:00
parent defc997230
commit 41f5852eea
5 changed files with 18 additions and 18 deletions

View File

@@ -1291,6 +1291,7 @@ char *sqlite3OsFullPathname(const char *zRelative){
sqlite3SetString(&zFull, zRelative, (char*)0);
}else{
char zBuf[5000];
zBuf[0] = 0;
sqlite3SetString(&zFull, getcwd(zBuf, sizeof(zBuf)), "/", zRelative,
(char*)0);
}