From c0e97efb0c986cca7d1c6f02bc29239cf9f240fa Mon Sep 17 00:00:00 2001 From: Jerome Duval Date: Tue, 30 Mar 2021 11:02:32 +0200 Subject: [PATCH] grafx2: add some checks --- media-gfx/grafx2/grafx2-2.8.recipe | 3 +- media-gfx/grafx2/patches/grafx2-2.7.patchset | 31 ++++++++++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 media-gfx/grafx2/patches/grafx2-2.7.patchset diff --git a/media-gfx/grafx2/grafx2-2.8.recipe b/media-gfx/grafx2/grafx2-2.8.recipe index c8ccd7399..846228f57 100644 --- a/media-gfx/grafx2/grafx2-2.8.recipe +++ b/media-gfx/grafx2/grafx2-2.8.recipe @@ -8,12 +8,13 @@ HOMEPAGE="http://grafx2.tk" COPYRIGHT="1995-2001 Sunset Design 2007-2021 GrafX2 project team" LICENSE="GNU GPL v2" -REVISION="1" +REVISION="2" GITREV="8e2d28b5cfd0e3220ce4c5b38be8d0f3af650c89" SOURCE_URI="https://gitlab.com/GrafX2/grafX2/-/archive/${GITREV}/grafX2-${GITREV}.tar.bz2" SOURCE_FILENAME="grafx2-2.8-${GITREV}.tar.gz" SOURCE_DIR="grafX2-${GITREV}" CHECKSUM_SHA256="21320e7d82eb3c6881dc2a4e9ae37e579eecd703d31dbb172cc881220a115dd2" +PATCHES="grafx2-$portVersion.patchset" ARCHITECTURES="!x86_gcc2 x86_64" SECONDARY_ARCHITECTURES="x86" diff --git a/media-gfx/grafx2/patches/grafx2-2.7.patchset b/media-gfx/grafx2/patches/grafx2-2.7.patchset new file mode 100644 index 000000000..517f6fa2d --- /dev/null +++ b/media-gfx/grafx2/patches/grafx2-2.7.patchset @@ -0,0 +1,31 @@ +From b616fdb35baf79ece153b70ca3613d57dee212de Mon Sep 17 00:00:00 2001 +From: Jerome Duval +Date: Tue, 30 Mar 2021 10:59:41 +0200 +Subject: add checks in Extract_path + + +diff --git a/src/io.c b/src/io.c +index ab64904..30da356 100644 +--- a/src/io.c ++++ b/src/io.c +@@ -353,6 +353,17 @@ char * Extract_path(char *dest, const char *source) + char * position; + char * path; + ++ if (dest == NULL) ++ { ++ GFX2_Log(GFX2_ERROR, "Extract_path() dest is null !\n"); ++ return NULL; ++ } ++ if (source == NULL) ++ { ++ GFX2_Log(GFX2_ERROR, "Extract_path() source is null !\n"); ++ return NULL; ++ } ++ + path = Realpath(source, dest); + if (path == NULL) + { +-- +2.30.0 +