1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-02 03:52:49 -05:00

Fix various segfaults and heap trashes. Thanks to Andrew Mobbs.

[originally from svn r29]
This commit is contained in:
Simon Tatham
1999-02-09 15:39:08 +00:00
parent 3b1389a474
commit ee9e246617
4 changed files with 6 additions and 7 deletions

View File

@ -73,7 +73,7 @@ void noise_get_heavy(void (*func) (void *, int)) {
FILE_SHARE_READ | FILE_SHARE_WRITE,
NULL, OPEN_EXISTING, 0, NULL);
if (seedf) {
if (seedf != INVALID_HANDLE_VALUE) {
while (1) {
char buf[1024];
DWORD len;
@ -96,7 +96,7 @@ void random_save_seed(void) {
seedf = CreateFile(seedpath, GENERIC_WRITE, 0,
NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
if (seedf) {
if (seedf != INVALID_HANDLE_VALUE) {
int len;
DWORD lenwritten;
void *data;