Opened 4 years ago

Closed 4 years ago

#11636 closed defect (fixed)

wxFileConfig crashes when reading from empty file via wxFileInputStream

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

Description

To reproduce:

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

new wxFileConfig(cfile)

Attached patch fixes this problem.

Attachments (1)

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

Download all attachments as: .zip

Change History (2)

Changed 4 years ago by lmichalski

fixed indents to 4 spaces

comment:1 Changed 4 years ago by VZ

  • Resolution set to fixed
  • Status changed from new to closed

(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.