Github messages for voidlinux
 help / color / mirror / Atom feed
From: karl-nilsson <karl-nilsson@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: [PR PATCH] occt: fix segfault in OSD_Host::InternetAddress
Date: Thu, 05 Nov 2020 05:26:35 +0100	[thread overview]
Message-ID: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-26145@inbox.vuxu.org> (raw)

[-- 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

             reply	other threads:[~2020-11-05  4:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-05  4:26 karl-nilsson [this message]
2020-11-06 15:09 ` [PR PATCH] [Merged]: " ericonr

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-26145@inbox.vuxu.org \
    --to=karl-nilsson@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).