pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/emulators/retroarch retroarch: Fix a null pointer dere...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/fea18ad4b3bc
branches:  trunk
changeset: 395965:fea18ad4b3bc
user:      nia <nia%pkgsrc.org@localhost>
date:      Sat May 18 12:27:47 2019 +0000

description:
retroarch: Fix a null pointer deref on initial startup.

Bump PKGREVISION.

diffstat:

 emulators/retroarch/Makefile                                        |   4 +-
 emulators/retroarch/distinfo                                        |   4 +-
 emulators/retroarch/patches/patch-frontend_drivers_platform__unix.c |  15 +++++++++-
 3 files changed, 18 insertions(+), 5 deletions(-)

diffs (59 lines):

diff -r ce0ec6849494 -r fea18ad4b3bc emulators/retroarch/Makefile
--- a/emulators/retroarch/Makefile      Sat May 18 10:41:59 2019 +0000
+++ b/emulators/retroarch/Makefile      Sat May 18 12:27:47 2019 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.21 2019/05/11 11:56:33 nia Exp $
+# $NetBSD: Makefile,v 1.22 2019/05/18 12:27:47 nia Exp $
 
 PKGNAME=       retroarch-${RETROARCH_VERSION}
 DISTNAME=      RetroArch-${RETROARCH_VERSION}
-PKGREVISION=   1
+PKGREVISION=   2
 CATEGORIES=    emulators
 MASTER_SITES=  ${MASTER_SITE_GITHUB:=libretro/RetroArch/releases/download/v${RETROARCH_VERSION}/}
 EXTRACT_SUFX=  .tar.xz
diff -r ce0ec6849494 -r fea18ad4b3bc emulators/retroarch/distinfo
--- a/emulators/retroarch/distinfo      Sat May 18 10:41:59 2019 +0000
+++ b/emulators/retroarch/distinfo      Sat May 18 12:27:47 2019 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.12 2019/05/11 11:56:33 nia Exp $
+$NetBSD: distinfo,v 1.13 2019/05/18 12:27:47 nia Exp $
 
 SHA1 (RetroArch-1.7.7.tar.xz) = 32288d3cc23319280c80968e9f0446e00f24db19
 RMD160 (RetroArch-1.7.7.tar.xz) = e019c8a6486706e076878adc0510178e5c8d5d81
@@ -7,5 +7,5 @@
 SHA1 (patch-Makefile) = a4dd20cf34724f79e4cc886c5d7a383a11d2e42d
 SHA1 (patch-audio_drivers_audioio.c) = 50820a7f3fbf7685098efdb794dd4efa485df806
 SHA1 (patch-configuration.c) = 58873db839f8f0ed2e011d4c4c75b00e6293c239
-SHA1 (patch-frontend_drivers_platform__unix.c) = b3e2b8ccf19d72c1c561bbbc1913996e12d88aeb
+SHA1 (patch-frontend_drivers_platform__unix.c) = e81ba53af2bdd4cecc4007cc9556f06446bf3b3f
 SHA1 (patch-qb_config.libs.sh) = 0ec6ab7d49cdcd59c5938276517df1ee0212868e
diff -r ce0ec6849494 -r fea18ad4b3bc emulators/retroarch/patches/patch-frontend_drivers_platform__unix.c
--- a/emulators/retroarch/patches/patch-frontend_drivers_platform__unix.c       Sat May 18 10:41:59 2019 +0000
+++ b/emulators/retroarch/patches/patch-frontend_drivers_platform__unix.c       Sat May 18 12:27:47 2019 +0000
@@ -1,7 +1,9 @@
-$NetBSD: patch-frontend_drivers_platform__unix.c,v 1.3 2019/05/08 12:40:05 nia Exp $
+$NetBSD: patch-frontend_drivers_platform__unix.c,v 1.4 2019/05/18 12:27:47 nia Exp $
 
 Pick up paths from pkgsrc.
 
+Avoid dereferencing a null pointer returned from getenv (see pull/8805).
+
 --- frontend/drivers/platform_unix.c.orig      2019-05-08 06:06:23.000000000 +0000
 +++ frontend/drivers/platform_unix.c
 @@ -1868,32 +1868,15 @@ static void frontend_unix_get_env(int *a
@@ -58,3 +60,14 @@
     fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_SHADER], base_path,
           "shaders", sizeof(g_defaults.dirs[DEFAULT_DIR_SHADER]));
     fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CHEATS], base_path,
+@@ -2523,7 +2506,9 @@ enum retro_language frontend_unix_get_us
+       }
+    }
+ #else
+-   lang = rarch_get_language_from_iso(getenv("LANG"));
++   char *envvar = getenv("LANG");
++   if (envvar)
++      lang = rarch_get_language_from_iso(getenv("LANG"));
+ #endif
+ #endif
+    return lang;



Home | Main Index | Thread Index | Old Index