Ticket #11636 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

wxFileConfig crashes when reading from empty file via wxFileInputStream

Reported by: lmichalski Owned by:
Priority: normal Milestone:
Component: base Version: 2.9-svn
Keywords: wxFileConf stream Cc:
Blocked By: Patch: yes
Blocking:

Description

To reproduce:

wxFFile cfile;
cfile.Open("config.ini","w");
cfile.Close();

new wxFileConfig(cfile)

Attached patch fixes this problem.

Attachments

fileconf.patch download (1.7 KB) - added by lmichalski 3 years ago.
fixed indents to 4 spaces

Change History

Changed 3 years ago by lmichalski

fixed indents to 4 spaces

Changed 3 years ago by VZ

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

(In [63228]) Don't crash when input is empty in wxFileConfig(wxInputStream) ctor.

Fix crash due to dereferencing a NULL pointer when the input buffer in
wxFileConfig ctor is empty.

Closes #11636.

Note: See TracTickets for help on using tickets.