windows: fix uninitialized memory access in uv_update_time()

uv_update_time does not overwrite the high 32 bits of uv_loop_t.time.
It merely increments it by one when the low 32 bits have wrapped. That
means that `time` needs to be initialized to zero before
uv_update_time() is called for the first time.
This commit is contained in:
Bert Belder 2012-08-21 01:17:48 +02:00
parent 012cbda719
commit a7b83e0b98

View File

@ -70,6 +70,9 @@ static void uv_loop_init(uv_loop_t* loop) {
uv_fatal_error(GetLastError(), "CreateIoCompletionPort");
}
/* To prevent uninitialized memory access, loop->time must be intialized */
/* to zero before calling uv_update_time for the first time. */
loop->time = 0;
uv_update_time(loop);
ngx_queue_init(&loop->handle_queue);