BusyBox Bug and Patch Tracking
BusyBox
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0001321 [uClibc++] Other crash always 04-22-07 06:43 04-27-07 17:51
Reporter tommi View Status public  
Assigned To gkajmowi
Priority normal Resolution fixed  
Status resolved   Product Version
Summary 0001321: std::ifstream segfaults in reading data, when no file is open
Description Reading from a std::ifstream without opening a file, results in a segfault. A simple case, which shows that bug is this:

#include <fstream>
int main(int argc, char* argv[])
{
  std::ifstream in;
  in.get();
}

Reading from ifstream without a open file is expected to return traits::eof() instead of just crashing. The reason for the crash is, that basic_filebuf::underflow does not check this condition.
Additional Information Patch attached
Attached Files  fstream-eof.diff [^] (330 bytes) 04-22-07 06:43

- Relationships

- Notes
(0002332)
gkajmowi
04-27-07 17:51

Fixed in SVN. I used a slightly different approach to fixing, though the result is essentially the same.
 

- Issue History
Date Modified Username Field Change
04-22-07 06:43 tommi New Issue
04-22-07 06:43 tommi Status new => assigned
04-22-07 06:43 tommi Assigned To  => gkajmowi
04-22-07 06:43 tommi File Added: fstream-eof.diff
04-27-07 17:51 gkajmowi Status assigned => resolved
04-27-07 17:51 gkajmowi Fixed in Version  => 0.2.2
04-27-07 17:51 gkajmowi Resolution open => fixed
04-27-07 17:51 gkajmowi Note Added: 0002332


Copyright © 2000 - 2006 Mantis Group
Powered by Mantis Bugtracker