1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-04-20 08:47:46 +03:00

Provide dummy DWORD arguments to output parameters of GetDiskFreeSpace(A|W),

NULL causes access violations on Windows NT 4.0 (CVS 6477)

FossilOrigin-Name: 5350a6586cd6504a0724631e4ef46245832435f9
This commit is contained in:
chw 2009-04-09 14:27:06 +00:00
parent 0f5ea0b34c
commit a5dc7f73f9
3 changed files with 16 additions and 16 deletions

View File

@ -1,5 +1,5 @@
C Remove\smisuse\sdetection\sfrom\sthe\sdeprecated\ssqlite3_transfer_bindings()\ninterface.\s\sThe\scode\swas\shard\sto\stest\sand\swas\ssimply\staking\sup\sspace.\s(CVS\s6476) C Provide\sdummy\sDWORD\sarguments\sto\soutput\sparameters\sof\sGetDiskFreeSpace(A|W),\nNULL\scauses\saccess\sviolations\son\sWindows\sNT\s4.0\s(CVS\s6477)
D 2009-04-09T14:02:44 D 2009-04-09T14:27:07
F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0 F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
F Makefile.in 583e87706abc3026960ed759aff6371faf84c211 F Makefile.in 583e87706abc3026960ed759aff6371faf84c211
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654 F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
@ -142,7 +142,7 @@ F src/os.h fa3f4aa0119ff721a2da4b47ffd74406ac864c05
F src/os_common.h 8c61457df58f1a4bd5f5adc3e90e01b37bf7afbc F src/os_common.h 8c61457df58f1a4bd5f5adc3e90e01b37bf7afbc
F src/os_os2.c bed77dc26e3a95ce4a204936b9a1ca6fe612fcc5 F src/os_os2.c bed77dc26e3a95ce4a204936b9a1ca6fe612fcc5
F src/os_unix.c 9ad9f45049a3c9eb0b0713b162ff0d7024ff7259 F src/os_unix.c 9ad9f45049a3c9eb0b0713b162ff0d7024ff7259
F src/os_win.c 524fe4c31c469531191857e8036ef59bfb52d684 F src/os_win.c 25092e59f1e5969779c393fd75bc945c2f375513
F src/pager.c 1df277b7c78f780df119c9e2ddea6690979489c5 F src/pager.c 1df277b7c78f780df119c9e2ddea6690979489c5
F src/pager.h 0c9f3520c00d8a3b8e792ca56c9a11b6b02b4b0f F src/pager.h 0c9f3520c00d8a3b8e792ca56c9a11b6b02b4b0f
F src/parse.y b7e4341b21736a90b952aa6bb663ec98529b778e F src/parse.y b7e4341b21736a90b952aa6bb663ec98529b778e
@ -716,7 +716,7 @@ F tool/speedtest16.c c8a9c793df96db7e4933f0852abb7a03d48f2e81
F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224 F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
P 0c41f7cff4f6ffb9321f6f6b6ef3e431b750d41a P 4cd829107cc9e94b092490aa821574492292b425
R 59e3d78266a19aec5181c6f03b28fa03 R de2c128074d32bc574b137f4ee9c3ca3
U drh U chw
Z f358b0439d22ea82c6fffdf3f3cfcb17 Z 77e6894f7086b25d7b8865e2fe513fb6

View File

@ -1 +1 @@
4cd829107cc9e94b092490aa821574492292b425 5350a6586cd6504a0724631e4ef46245832435f9

View File

@ -12,7 +12,7 @@
** **
** This file contains code that is specific to windows. ** This file contains code that is specific to windows.
** **
** $Id: os_win.c,v 1.153 2009/03/31 03:41:57 shane Exp $ ** $Id: os_win.c,v 1.154 2009/04/09 14:27:07 chw Exp $
*/ */
#include "sqliteInt.h" #include "sqliteInt.h"
#if SQLITE_OS_WIN /* This file is used for windows only */ #if SQLITE_OS_WIN /* This file is used for windows only */
@ -1587,7 +1587,7 @@ static int getSectorSize(
DWORD bytesPerSector = SQLITE_DEFAULT_SECTOR_SIZE; DWORD bytesPerSector = SQLITE_DEFAULT_SECTOR_SIZE;
char zFullpath[MAX_PATH+1]; char zFullpath[MAX_PATH+1];
int rc; int rc;
DWORD dwRet = 0; DWORD dwRet = 0, dwDummy;
/* /*
** We need to get the full path name of the file ** We need to get the full path name of the file
@ -1611,10 +1611,10 @@ static int getSectorSize(
} }
} }
dwRet = GetDiskFreeSpaceW((WCHAR*)zConverted, dwRet = GetDiskFreeSpaceW((WCHAR*)zConverted,
NULL, &dwDummy,
&bytesPerSector, &bytesPerSector,
NULL, &dwDummy,
NULL); &dwDummy);
#if SQLITE_OS_WINCE==0 #if SQLITE_OS_WINCE==0
}else{ }else{
int i; int i;
@ -1628,10 +1628,10 @@ static int getSectorSize(
} }
} }
dwRet = GetDiskFreeSpaceA((CHAR*)zConverted, dwRet = GetDiskFreeSpaceA((CHAR*)zConverted,
NULL, &dwDummy,
&bytesPerSector, &bytesPerSector,
NULL, &dwDummy,
NULL); &dwDummy);
#endif #endif
} }
free(zConverted); free(zConverted);