Bug report #14182
Geometry.fromWkb crashes on unexpected/malformed WKB
Status: | Closed | ||
---|---|---|---|
Priority: | Normal | ||
Assignee: | Jürgen Fischer | ||
Category: | Geometry | ||
Affected QGIS version: | master | Regression?: | No |
Operating System: | Easy fix?: | No | |
Pull Request or Patch supplied: | No | Resolution: | fixed/implemented |
Crashes QGIS or corrupts data: | Yes | Copied to github as #: | 22184 |
Description
Testcase can be found on https://github.com/qgis/QGIS/pull/2722
This is a spin-off of ticket #12416
Last tested on d80a632bd8a9033bffa17295c7c6bd3d49c232b5
History
#1 Updated by Sandro Santilli almost 9 years ago
The test in PR https://github.com/qgis/QGIS/pull/2722 was bogus, I'm working on another test, but it isn't easy to predict whether or not a segfault would happen.
Valgrind reports are clear on the matter, though.
#2 Updated by Sandro Santilli almost 9 years ago
So the new test is in https://github.com/qgis/QGIS/pull/2751.
Main problem is that parsing does NOT happen upfront but only when needed, so it takes forcing a call like "exportToWkt" to trigger memory errors.
I don't know if different code paths trigger different WKB parsing, which would be very hard to debug.
#3 Updated by Sandro Santilli almost 9 years ago
- Tag set to WKB
#4 Updated by Sandro Santilli almost 9 years ago
- Assignee changed from Sandro Santilli to Jürgen Fischer
Reassigning to Jurgen as he's championing https://github.com/qgis/QGIS/pull/2748 which provides a fix for this and a few more bugs.
#5 Updated by Sandro Santilli almost 9 years ago
- Category set to Geometry
#6 Updated by Sandro Santilli almost 9 years ago
- Resolution set to fixed/implemented
- Status changed from In Progress to Closed
- % Done changed from 0 to 100