View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0031925 | Community | OCCT:Foundation Classes | public | 2020-11-13 16:42 | 2023-08-01 15:08 |
Reporter | kgv | Assigned To | |||
Priority | normal | Severity | minor | ||
Status | assigned | Resolution | open | ||
Platform | Linux | ||||
Product Version | 5.2.2 | ||||
Target Version | Unscheduled | ||||
Summary | 0031925: Foundation Classes, OSD_Host::InternetAddress() - possible NULL dereference on copying gethostbyname() result | ||||
Description | > When writing a STEP AP203 file, the fallback value for the organization is the computer's IP address. > This function segfaults, because gethostbyname returns a null pointer. > OS: Linux 5.8.16 https://old.opencascade.com/content/segfault-osdhostinternetaddress#comment-21811 Backtrace: #0 0x00007ffff6e937bd in OSD_Host::InternetAddress() () from /usr/lib/libTKernel.so.7 0000001 0x00007ffff3c26d07 in STEPConstruct_AP203Context::DefaultPersonAndOrganization() () from /usr/lib/libTKSTEP.so.7 0000002 0x00007ffff3c2950e in STEPConstruct_AP203Context::InitPart(STEPConstruct_Part const&) () from /usr/lib/libTKSTEP.so.7 #3 0x00007ffff3c2e20f in STEPConstruct_ContextTool::GetRootsForPart(STEPConstruct_Part const&) () from /usr/lib/libTKSTEP.so.7 #4 0x00007ffff3cb62c6 in STEPControl_ActorWrite::Transfer(opencascade::handle<Transfer_Finder> const&, opencascade::handle<Transfer_FinderProcess> const&) () from /usr/lib/libTKSTEP.so.7 #5 0x00007ffff3467d2b in Transfer_ActorOfFinderProcess::Transferring(opencascade::handle<Transfer_Finder> const&, opencascade::handle<Transfer_ProcessForFinder> const&) () from /usr/lib/libTKXSBase.so.7 #6 0x00007ffff3470329 in Transfer_ProcessForFinder::TransferProduct(opencascade::handle<Transfer_Finder> const&) () from /usr/lib/libTKXSBase.so.7 0000007 0x00007ffff3473d3c in Transfer_ProcessForFinder::Transferring(opencascade::handle<Transfer_Finder> const&) () from /usr/lib/libTKXSBase.so.7 0000008 0x00007ffff3474167 in Transfer_ProcessForFinder::Transfer(opencascade::handle<Transfer_Finder> const&) () from /usr/lib/libTKXSBase.so.7 0000009 0x00007ffff34e956f in ?? () from /usr/lib/libTKXSBase.so.7 #10 0x00007ffff34e98d8 in XSControl_Controller::TransferWriteShape(TopoDS_Shape const&, opencascade::handle<Transfer_FinderProcess> const&, opencascade::handle<Interface_InterfaceModel> const&, int) const () from /usr/lib/libTKXSBase.so.7 0000011 0x00007ffff3cba9ad in STEPControl_Controller::TransferWriteShape(TopoDS_Shape const&, opencascade::handle<Transfer_FinderProcess> const&, opencascade::handle<Interface_InterfaceModel> const&, int) const () from /usr/lib/libTKSTEP.so.7 #12 0x00007ffff35028b5 in XSControl_TransferWriter::TransferWriteShape(opencascade::handle<Interface_InterfaceModel> const&, TopoDS_Shape const&) () from /usr/lib/libTKXSBase.so.7 0000013 0x00007ffff350b80f in XSControl_WorkSession::TransferWriteShape(TopoDS_Shape const&, bool) () from /usr/lib/libTKXSBase.so.7 0000014 0x00007ffff3cc1fc2 in STEPControl_Writer::Transfer(TopoDS_Shape const&, STEPControl_StepModelType, bool) () from /usr/lib/libTKSTEP.so.7 | ||||
Tags | No tags attached. | ||||
Test case number | |||||
|
Branch CR31925 has been created by kgv. SHA-1: de0c75694ad9c9523bbe0d6920935d11627bc7d9 Detailed log of new commits: Author: kgv Date: Fri Nov 13 19:59:24 2020 +0300 0031925: Foundation Classes, OSD_Host::InternetAddress() - possible NULL dereference on copying gethostbyname() result Changes on non-Windows platforms: - Deprecated gethostbyname() has been replaced by getifaddrs()+inet_ntop() handling IPv4+IPv6 addresses; - External IPs are now preferred comparing to dummy localhost 127.0.0.1. |
|
Patch is ready for review - OCCT branch: CR31925. http://jenkins-test-12.nnov.opencascade.com:8080/view/CR31925-master-KGV/view/COMPARE/ |
|
Reviewed, please integrate; note that the patch should be checked for compilation on old Linux platforms |
|
Branch CR31925 has been updated by kgv. SHA-1: ee1aa503150ef25f872f979c3d9963db42ff2841 Detailed log of new commits: Author: kgv Date: Fri Nov 20 12:04:33 2020 +0300 # fallback for old Android |
Date Modified | Username | Field | Change |
---|---|---|---|
2020-11-13 16:42 | kgv | New Issue | |
2020-11-13 16:42 | kgv | Assigned To | => abv |
2020-11-13 19:59 | git | Note Added: 0096757 | |
2020-11-14 09:40 | kgv | Note Added: 0096774 | |
2020-11-14 09:40 | kgv | Status | new => resolved |
2020-11-15 17:51 | kgv | Product Version | 7.4.0 => 5.2.2 |
2020-11-17 09:29 |
|
Note Added: 0096810 | |
2020-11-17 09:29 |
|
Assigned To | abv => bugmaster |
2020-11-17 09:29 |
|
Status | resolved => reviewed |
2020-11-17 09:29 |
|
Note Edited: 0096810 | |
2020-11-20 12:04 | git | Note Added: 0096914 | |
2020-11-20 12:04 | kgv | Assigned To | bugmaster => kgv |
2020-11-20 12:04 | kgv | Status | reviewed => assigned |
2021-09-09 23:26 | kgv | Target Version | 7.6.0 => 7.7.0 |
2022-10-19 15:50 |
|
Assigned To | kgv => vpozdyayev |
2022-10-24 10:40 |
|
Target Version | 7.7.0 => 7.8.0 |
2023-08-01 15:08 | dpasukhi | Target Version | 7.8.0 => Unscheduled |