Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] occt: fix segfault in OSD_Host::InternetAddress
@ 2020-11-05  4:26 karl-nilsson
  2020-11-06 15:09 ` [PR PATCH] [Merged]: " ericonr
  0 siblings, 1 reply; 2+ messages in thread
From: karl-nilsson @ 2020-11-05  4:26 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 370 bytes --]

There is a new pull request by karl-nilsson against master on the void-packages repository

https://github.com/karl-nilsson/void-packages occt_fix
https://github.com/void-linux/void-packages/pull/26145

occt: fix segfault in OSD_Host::InternetAddress
This fixes a rare segfault.

A patch file from https://github.com/void-linux/void-packages/pull/26145.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-occt_fix-26145.patch --]
[-- Type: text/x-diff, Size: 1417 bytes --]

From b77f249aa68a0329cf80962e55c855cff82c4c74 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Mon, 2 Nov 2020 19:11:15 -0500
Subject: [PATCH] occt: fix segfault in OSD_Host::InternetAddress

[ci skip]
---
 srcpkgs/occt/patches/fix-osd-host.patch | 13 +++++++++++++
 srcpkgs/occt/template                   |  2 +-
 2 files changed, 14 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/occt/patches/fix-osd-host.patch

diff --git a/srcpkgs/occt/patches/fix-osd-host.patch b/srcpkgs/occt/patches/fix-osd-host.patch
new file mode 100644
index 00000000000..329e9a2e9e4
--- /dev/null
+++ b/srcpkgs/occt/patches/fix-osd-host.patch
@@ -0,0 +1,13 @@
+# gethostbyname returns a nullptr, because the host can't resolve itself
+
+--- src/OSD/OSD_Host.cxx
++++ src/OSD/OSD_Host.cxx
+@@ -124,7 +124,7 @@ TCollection_AsciiString OSD_Host::InternetAddress(){
+ 
+  host = HostName();
+  memcpy(&internet_address,
+-        gethostbyname(host.ToCString()),
++        gethostbyname("localhost"),
+         sizeof(struct hostent));
+ 
+  // Gets each bytes into integers
diff --git a/srcpkgs/occt/template b/srcpkgs/occt/template
index fc6a9fc80dc..f9777bfe27b 100644
--- a/srcpkgs/occt/template
+++ b/srcpkgs/occt/template
@@ -1,7 +1,7 @@
 # Template file for 'occt'
 pkgname=occt
 version=7.4.0p1
-revision=1
+revision=2
 _gittag="V${version//./_}"
 wrksrc=occt-${_gittag}
 build_style=cmake

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PR PATCH] [Merged]: occt: fix segfault in OSD_Host::InternetAddress
  2020-11-05  4:26 [PR PATCH] occt: fix segfault in OSD_Host::InternetAddress karl-nilsson
@ 2020-11-06 15:09 ` ericonr
  0 siblings, 0 replies; 2+ messages in thread
From: ericonr @ 2020-11-06 15:09 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 208 bytes --]

There's a merged pull request on the void-packages repository

occt: fix segfault in OSD_Host::InternetAddress
https://github.com/void-linux/void-packages/pull/26145

Description:
This fixes a rare segfault.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-11-06 15:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-05  4:26 [PR PATCH] occt: fix segfault in OSD_Host::InternetAddress karl-nilsson
2020-11-06 15:09 ` [PR PATCH] [Merged]: " ericonr

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).