Ticket #4696 (closed defect: invalid)

Opened 13 months ago

Last modified 13 months ago

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

Changed 13 months ago by mkulvietis

  • version changed from unspecified to 1.9.0

Changed 13 months ago by rouault

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.

Changed 13 months ago by rouault

  • status changed from new to closed
  • resolution set to invalid

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.