View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0012187 | ParaView | Bug | public | 2011-05-12 14:58 | 2016-08-12 09:58 | ||||
Reporter | Pat Marion | ||||||||
Assigned To | Ken Moreland | ||||||||
Priority | normal | Severity | crash | Reproducibility | always | ||||
Status | closed | Resolution | moved | ||||||
Platform | OS | OS Version | |||||||
Product Version | |||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0012187: Crash in Exodus reader's ReadMetaDataFile | ||||||||
Description | I have a .bin file that I want to open with the raw image reader. Paraview doesn't recognize the .bin extension though, so it presents me with a list of readers to choose from. In order to compile the list of available readers, paraview calls CanReadFile("test.bin") on every reader. When it gets to the vtkExodusFileSeriesReader there is a crash. It goes: 1) vtkFileSeriesReader::CanReadFile("test.bin") 2) if (this->UseMetaFile) <-- true 3) vtkFileSeriesReader::ReadMetaDataFile("test.bin") This routine opens test.bin as an ifstream and reads the contents into a std::string: metafile >> fname; Now fname contains garbage, because this is a raw image file. 4) vtkExodusIIReader::CanReadFile(<garbage>) This routine fails to open the file, tries to create an error message and calls strcpy on the garbage value and crashes. So this can be avoided if we check that metafile >> fname reads only ascii characters. One solution is adding: for (size_t i = 0; i < fname.size(); ++i) { if (static_cast<unsigned char>(fname[i]) > 127) { return 0; } } Is it ok to call metafile >> fname on binary files? We could read metafile character by character instead of checking fname after the fact. Are there any scenarios where metafile uses a non ascii text encoding that should be supported? | ||||||||
Tags | No tags attached. | ||||||||
Project | |||||||||
Topic Name | |||||||||
Type | |||||||||
Attached Files | |||||||||
Relationships | |
Relationships |
Notes | |
(0037974) Kitware Robot (administrator) 2016-08-12 09:58 |
Resolving issue as `moved`. This issue tracker is no longer used. Further discussion of this issue may take place in the current ParaView Issues page linked in the banner at the top of this page. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2011-05-12 14:58 | Pat Marion | New Issue | |
2011-05-12 14:58 | Pat Marion | Status | backlog => tabled |
2011-05-12 14:58 | Pat Marion | Assigned To | => Ken Moreland |
2016-08-12 09:58 | Kitware Robot | Note Added: 0037974 | |
2016-08-12 09:58 | Kitware Robot | Status | backlog => closed |
2016-08-12 09:58 | Kitware Robot | Resolution | open => moved |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |