Archived issue #0031690
Application Framework - Default Arguments for Document Opening Lead to Segmentation Faults
Description
With [revision removed] the signature of TDocStd_Application::Open(...) has changed. It takes now a handle to a Message_ProgressIndicator which is by default initialized to be a null handle.
I consider this a bad design, because BinLDrivers_DocumentRetrievalDriver::Read accesses this progress indicator without performing a null handle check. Old code that is not passing a valid progress indicator will therefore crash because of a segmentation fault.
My proposal would be to add null handle checks everywhere or remove the default argument.
(Please not that the same issue is most probably also true for the Save(...) methods.)
I consider this a bad design, because BinLDrivers_DocumentRetrievalDriver::Read accesses this progress indicator without performing a null handle check. Old code that is not passing a valid progress indicator will therefore crash because of a segmentation fault.
My proposal would be to add null handle checks everywhere or remove the default argument.
(Please not that the same issue is most probably also true for the Save(...) methods.)
Public activity
2 archived notes
Participants are labeled by their role within this record.
Andrey, please take care of this issue. I think it will be solved along with 25748.
This bug can be closed, as the patch for #0025748 has been integrated and it solves this issue.
Related records