Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
aports
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
alpine
aports
Commits
3cfac69e
Commit
3cfac69e
authored
4 years ago
by
Sören Tempel
Browse files
Options
Downloads
Patches
Plain Diff
community/radare2: fix double-free causing crash on exit
Backported from upstream.
parent
52db8d39
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
community/radare2/0001-Fix-double-free-in-charset-sdb.patch
+23
-0
23 additions, 0 deletions
community/radare2/0001-Fix-double-free-in-charset-sdb.patch
community/radare2/APKBUILD
+3
-1
3 additions, 1 deletion
community/radare2/APKBUILD
with
26 additions
and
1 deletion
community/radare2/0001-Fix-double-free-in-charset-sdb.patch
0 → 100644
+
23
−
0
View file @
3cfac69e
From 64676437e9aa46f3cf614e06e4f03e31fc461c94 Mon Sep 17 00:00:00 2001
From: pancake <pancake@nopcode.org>
Date: Wed, 23 Dec 2020 21:29:05 +0100
Subject: [PATCH] Fix double-free in charset sdb
---
libr/core/core.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libr/core/core.c b/libr/core/core.c
index 81c991ffc..f72e581d7 100644
--- a/libr/core/core.c
+++ b/libr/core/core.c
@@ -2714,6 +2714,9 @@
R_API bool r_core_init(RCore *core) {
core->lastcmd = NULL;
core->cmdlog = NULL;
core->print->charset->db = sdb_ns (core->sdb, "charset", 1);
+ core->print->charset->db->refs++; // increase reference counter to avoid double-free
+ // ideally sdb_ns_set should be used here, but it doesnt seems to work well. must fix
+ // sdb_ns_set (DB, "charset", core->print->charset->db);
core->stkcmd = NULL;
core->cmdqueue = NULL;
core->cmdrepeat = true;
This diff is collapsed.
Click to expand it.
community/radare2/APKBUILD
+
3
−
1
View file @
3cfac69e
...
...
@@ -5,7 +5,7 @@
# Maintainer: Valery Kartel <valery.kartel@gmail.com>
pkgname
=
radare2
pkgver
=
5.0.0
pkgrel
=
0
pkgrel
=
1
pkgdesc
=
"An opensource, crossplatform reverse engineering framework"
url
=
"http://www.radare.org"
arch
=
"all"
...
...
@@ -14,6 +14,7 @@ options="!check" # upstream does not provide any working testsuite
makedepends
=
"
$depends_dev
libzip-dev openssl-dev capstone-dev linux-headers"
subpackages
=
"
$pkgname
-dev
$pkgname
-doc
$pkgname
-dbg
$pkgname
-libs"
source
=
"
$pkgname
-
$pkgver
.tar.gz::https://github.com/radare/radare2/archive/
$pkgver
.tar.gz
0001-Fix-double-free-in-charset-sdb.patch
string-header-build-fix.patch"
# secfixes:
...
...
@@ -47,4 +48,5 @@ package() {
}
sha512sums
=
"059bc341bc34c5f39ef7493af9e2d3b7e52667a2d16f12ef19c9c6ba83c911fd02e07cd527599caea503d5e81a5fedbd8ff343db4d41257e0f48ace9dd52f3ba radare2-5.0.0.tar.gz
5b0afdfb71b1c75dbdaf0b69320564469883fb3c74218a592bf08c147f9b786ac7d1bbee19f54fb9b739778ce9930c0bae2e6ea8d03a1fa22d2f3827f95d3e88 0001-Fix-double-free-in-charset-sdb.patch
5e60a1112a10cdd6a31374ba9b564d6522a37086380cf74b7232e32fb700ae1b2f68edbc0726ebedcc31d4789bc4f89525f117f25dac3609c60a75d471e49c85 string-header-build-fix.patch"
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment