]> asedeno.scripts.mit.edu Git - PuTTY.git/commit
Fix uninitialized variable in Windows get_file_posn.
authorTim Kosse <tim.kosse@filezilla-project.org>
Tue, 3 May 2016 21:27:57 +0000 (23:27 +0200)
committerSimon Tatham <anakin@pobox.com>
Wed, 4 May 2016 05:24:26 +0000 (06:24 +0100)
commit9ba51c79fa35b336ae6768b127e31b9214980dfb
tree0bd81616a09505fcd60f488eecd7ab95aed64d23
parentcc9d920c78eaf437d4cf4e7e8ebd9e6ceabf8d04
Fix uninitialized variable in Windows get_file_posn.

The Windows implementation of get_file_posn is calling SetFilePointer
to obtain the current position in the file. However it did not
initialize the variable holding the high order 32-bit to 0. Thus,
SetFilePointer either returned -1 to indicate an error or did move the
file pointer to a different location instead of just returning the
current position. This change just initializes the variable to 0.

As a result, this bug has caused psftp's reget command to fail
resuming transfers or to create corrupt files due to setting up an
incorrect resume offset.
windows/winsftp.c