diff options
author | Mike Gilbert <floppym@gentoo.org> | 2018-05-16 17:18:42 -0400 |
---|---|---|
committer | Mike Gilbert <floppym@gentoo.org> | 2018-05-16 17:18:42 -0400 |
commit | 00e26fc064d3097406733d3242c14f8b872a239e (patch) | |
tree | 5bb2d521802104b18f93e42b3af386cca028b7c8 /net-misc | |
parent | package.mask: Last rite app-misc/eid-viewer-bin (diff) | |
download | gentoo-00e26fc064d3097406733d3242c14f8b872a239e.tar.gz gentoo-00e26fc064d3097406733d3242c14f8b872a239e.tar.bz2 gentoo-00e26fc064d3097406733d3242c14f8b872a239e.zip |
net-misc/freerdp: fix null pointer deref in primitives
Closes: https://bugs.gentoo.org/655904
Package-Manager: Portage-2.3.36_p22, Repoman-2.3.9_p215
Diffstat (limited to 'net-misc')
-rw-r--r-- | net-misc/freerdp/files/2.0.0-rc2-primitives.patch | 41 | ||||
-rw-r--r-- | net-misc/freerdp/freerdp-2.0.0_rc2-r1.ebuild (renamed from net-misc/freerdp/freerdp-2.0.0_rc2.ebuild) | 4 |
2 files changed, 45 insertions, 0 deletions
diff --git a/net-misc/freerdp/files/2.0.0-rc2-primitives.patch b/net-misc/freerdp/files/2.0.0-rc2-primitives.patch new file mode 100644 index 000000000000..a82dec1ad0fc --- /dev/null +++ b/net-misc/freerdp/files/2.0.0-rc2-primitives.patch @@ -0,0 +1,41 @@ +From 9460f4292b130fcca58519a1c52b9aaef3265042 Mon Sep 17 00:00:00 2001 +From: Mike Gilbert <floppym@gentoo.org> +Date: Wed, 16 May 2018 16:15:50 -0400 +Subject: [PATCH] primitives: ensure primitives_get() returns a populated + struct + +Fixes: https://github.com/FreeRDP/FreeRDP/issues/4658 +--- + libfreerdp/primitives/primitives.c | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/libfreerdp/primitives/primitives.c b/libfreerdp/primitives/primitives.c +index fd236df6e7..d25c5b41dc 100644 +--- a/libfreerdp/primitives/primitives.c ++++ b/libfreerdp/primitives/primitives.c +@@ -28,10 +28,12 @@ + #include "prim_internal.h" + + /* Singleton pointer used throughout the program when requested. */ +-static primitives_t pPrimitives = { 0 }; + static primitives_t pPrimitivesGeneric = { 0 }; + static INIT_ONCE generic_primitives_InitOnce = INIT_ONCE_STATIC_INIT; ++#if defined(HAVE_OPTIMIZED_PRIMITIVES) ++static primitives_t pPrimitives = { 0 }; + static INIT_ONCE primitives_InitOnce = INIT_ONCE_STATIC_INIT; ++#endif + + + /* ------------------------------------------------------------------------- */ +@@ -74,8 +76,10 @@ primitives_t* primitives_get(void) + InitOnceExecuteOnce(&generic_primitives_InitOnce, primitives_init_generic, NULL, NULL); + #if defined(HAVE_OPTIMIZED_PRIMITIVES) + InitOnceExecuteOnce(&primitives_InitOnce, primitives_init, NULL, NULL); +-#endif + return &pPrimitives; ++#else ++ return &pPrimitivesGeneric; ++#endif + } + + primitives_t* primitives_get_generic(void) diff --git a/net-misc/freerdp/freerdp-2.0.0_rc2.ebuild b/net-misc/freerdp/freerdp-2.0.0_rc2-r1.ebuild index 48abe1a3fc71..328ca08dce11 100644 --- a/net-misc/freerdp/freerdp-2.0.0_rc2.ebuild +++ b/net-misc/freerdp/freerdp-2.0.0_rc2-r1.ebuild @@ -87,6 +87,10 @@ DEPEND="${RDEPEND} ) ) ) " +PATCHES=( + "${FILESDIR}"/2.0.0-rc2-primitives.patch +) + src_configure() { local mycmakeargs=( -DBUILD_TESTING=$(usex test) |