Skip to content

Commit

Permalink
Update rtorrent to version 0.9.8 / rev 11 via SR 984398
Browse files Browse the repository at this point in the history
https://build.opensuse.org/request/show/984398
by user jengelh + dimstar_suse
- Backport fix which resolves a crashing issue on startup on openSUSE.
  rakshasa/rtorrent#1169
  + 0001-utils-lockfile-avoid-stack-overflow-for-lockfile-buf.patch
  • Loading branch information
jengelh authored and bmwiedemann committed Jun 23, 2022
1 parent d44f054 commit f7bd215
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 3 deletions.
Binary file modified packages/r/rtorrent/.files
Binary file not shown.
10 changes: 10 additions & 0 deletions packages/r/rtorrent/.rev
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,14 @@
<comment></comment>
<requestid>932825</requestid>
</revision>
<revision rev="11" vrev="6">
<srcmd5>599d411258e80fee6b3314c29a4a3b3a</srcmd5>
<version>0.9.8</version>
<time>1655972653</time>
<user>dimstar_suse</user>
<comment>- Backport fix which resolves a crashing issue on startup on openSUSE.
https://github.com/rakshasa/rtorrent/pull/1169
+ 0001-utils-lockfile-avoid-stack-overflow-for-lockfile-buf.patch</comment>
<requestid>984398</requestid>
</revision>
</revisionlist>
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
From 954bfb70f24578ef33b1f77cf1a3d64fc2f2f595 Mon Sep 17 00:00:00 2001
From: Aleksa Sarai <cyphar@cyphar.com>
Date: Mon, 20 Jun 2022 19:09:57 +1000
Subject: [PATCH] utils: lockfile: avoid stack overflow for lockfile buffer
References: https://github.com/rakshasa/rtorrent/pull/1169

Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
---
src/utils/lockfile.cc | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/utils/lockfile.cc b/src/utils/lockfile.cc
index 7d11d8c9970f..fac5cb23e26f 100644
--- a/src/utils/lockfile.cc
+++ b/src/utils/lockfile.cc
@@ -98,7 +98,8 @@ Lockfile::try_lock() {
int pos = ::gethostname(buf, 255);

if (pos == 0) {
- ::snprintf(buf + std::strlen(buf), 255, ":+%i\n", ::getpid());
+ ssize_t len = std::strlen(buf);
+ ::snprintf(buf + len, 255 - len, ":+%i\n", ::getpid());
int __UNUSED result = ::write(fd, buf, std::strlen(buf));
}

--
2.36.1

9 changes: 8 additions & 1 deletion packages/r/rtorrent/rtorrent.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Tue Jun 21 00:28:35 UTC 2022 - Aleksa Sarai <asarai@suse.com>

- Backport fix which resolves a crashing issue on startup on openSUSE.
https://github.com/rakshasa/rtorrent/pull/1169
+ 0001-utils-lockfile-avoid-stack-overflow-for-lockfile-buf.patch

-------------------------------------------------------------------
Tue Nov 16 12:09:53 UTC 2021 - Johannes Segitz <jsegitz@suse.com>

Expand Down Expand Up @@ -51,7 +58,7 @@ Wed Jul 24 17:52:33 UTC 2019 - hiwatari.seiji@gmail.com
* Fix no // are at start of expanded paths. (pyroscope)
* Fix ncurses header include. (theirix)
* Fix segfault when viewing a magnet download in the leeching view. (slingamn)

- Remove rtorrent-vim package because it was made for the old (now discouraged) config syntax
* See: https://github.com/rakshasa/rtorrent/wiki/CONFIG-Template

Expand Down
5 changes: 3 additions & 2 deletions packages/r/rtorrent/rtorrent.spec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# spec file for package rtorrent
#
# Copyright (c) 2020 SUSE LLC
# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
Expand Down Expand Up @@ -29,6 +29,7 @@ Source2: rtorrent.desktop
# This manpage copied from the 0.9.2 tarball as it was missing in later versions
Source3: rtorrent.1
Source4: rtorrent.service
Patch1: 0001-utils-lockfile-avoid-stack-overflow-for-lockfile-buf.patch
BuildRequires: automake
BuildRequires: gcc-c++
BuildRequires: libtool
Expand All @@ -47,7 +48,7 @@ background using screen. It supports fast-resume and session
management.

%prep
%setup -q
%autosetup -p1

%build
# It's full of type pun violations
Expand Down

0 comments on commit f7bd215

Please sign in to comment.