diff options
author | 2019-11-21 09:41:27 +0000 | |
---|---|---|
committer | 2019-11-21 09:41:42 +0000 | |
commit | 9bebf5560d10a6264e05cdb38ebca50978b5aef8 (patch) | |
tree | 1856e4d14c8cefdaf92ccf5b4a3dcb8ecff1ea01 /app-misc/mc/files | |
parent | dev-python/prometheus_client: Version bump to 0.7.1 (diff) | |
download | gentoo-9bebf5560d10a6264e05cdb38ebca50978b5aef8.tar.gz gentoo-9bebf5560d10a6264e05cdb38ebca50978b5aef8.tar.bz2 gentoo-9bebf5560d10a6264e05cdb38ebca50978b5aef8.zip |
app-misc/mc: fix VFS SEGV in GC, bug #700708
Paul reports that nested archives cause corruption
of mc's data structures.
Picked upstream patch that avoids dereference of stale entries.
Reported-by: Paul Osmialowski
Closes: https://bugs.gentoo.org/700708
Package-Manager: Portage-2.3.79, Repoman-2.3.18
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Diffstat (limited to 'app-misc/mc/files')
-rw-r--r-- | app-misc/mc/files/mc-4.8.23-vfs-gc-SEGV.patch | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/app-misc/mc/files/mc-4.8.23-vfs-gc-SEGV.patch b/app-misc/mc/files/mc-4.8.23-vfs-gc-SEGV.patch new file mode 100644 index 000000000000..e72d641a5c3b --- /dev/null +++ b/app-misc/mc/files/mc-4.8.23-vfs-gc-SEGV.patch @@ -0,0 +1,37 @@ +https://bugs.gentoo.org/700708 + +From 8411b93ff7cc955b0acf1541207977c52201bbfc Mon Sep 17 00:00:00 2001 +From: Andrew Borodin <aborodin@vmail.ru> +Date: Wed, 11 Sep 2019 09:17:18 +0300 +Subject: [PATCH] (vfs_stamp_compare): fix NULL dereference. + +(vfs_stamp): likewise. + +Signed-off-by: Andrew Borodin <aborodin@vmail.ru> +--- + lib/vfs/gc.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/lib/vfs/gc.c ++++ b/lib/vfs/gc.c +@@ -127,7 +127,7 @@ vfs_stamp_compare (gconstpointer a, gconstpointer b) + const struct vfs_stamping *vsa = (const struct vfs_stamping *) a; + const struct vfs_stamping *vsb = (const struct vfs_stamping *) b; + +- return (vsa->v == vsb->v && vsa->id == vsb->id) ? 0 : 1; ++ return (vsa == NULL || vsb == NULL || (vsa->v == vsb->v && vsa->id == vsb->id)) ? 0 : 1; + } + + /* --------------------------------------------------------------------------------------------- */ +@@ -163,7 +163,7 @@ vfs_stamp (struct vfs_class *v, vfsid id) + gboolean ret = FALSE; + + stamp = g_slist_find_custom (stamps, &what, vfs_stamp_compare); +- if (stamp != NULL) ++ if (stamp != NULL && stamp->data != NULL) + { + gettimeofday (&(VFS_STAMPING (stamp->data)->time), NULL); + ret = TRUE; +-- +2.24.0 + |