-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update rtorrent to version 0.9.8 / rev 11 via SR 984398
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
1 parent
d44f054
commit f7bd215
Showing
5 changed files
with
49 additions
and
3 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
packages/r/rtorrent/0001-utils-lockfile-avoid-stack-overflow-for-lockfile-buf.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters