Opened 12 years ago

Closed 12 years ago

#4696 closed defect (invalid)

VSIWin32Handle::bEOF is uninitialized

Reported by: mkulvietis Owned by: warmerdam
Priority: normal Milestone:
Component: default Version: 1.9.0
Severity: normal Keywords:
Cc:

Description

In file port\cpl_vsil_win32.cpp, class VSIWin32Handle, member bEOF is only initialized in Seek function. I encountered this problem when opening .kml file which doesn't use seek functionality and bEOF member was accessed giving out random value.

I suggest to add a default constructor which initializes the value this solves the issue.

Change History (3)

comment:1 by mkulvietis, 12 years ago

Version: unspecified1.9.0

comment:2 by Even Rouault, 12 years ago

Actually, bEOF is initialized to FALSE at line 433 :

    VSIWin32Handle *poHandle = new VSIWin32Handle;
    
    poHandle->hFile = hFile;
    poHandle->bEOF = FALSE;

It would be better to have a proper constructor for VSIWin32Handle, but the initialization is well done, so your issue must be something else.

comment:3 by Even Rouault, 12 years ago

Resolution: invalid
Status: newclosed

Closing as I think things are OK (although not very C++ clean admitedly). Reopen if I missed something

Note: See TracTickets for help on using tickets.