aboutsummaryrefslogtreecommitdiffstats
path: root/comms
diff options
context:
space:
mode:
authorshurd <shurd@FreeBSD.org>2018-08-12 07:32:35 +0800
committershurd <shurd@FreeBSD.org>2018-08-12 07:32:35 +0800
commita6f9572095e28dbc47b98f771e105af71117c8ac (patch)
treeb348f9d3ae19c36d1a1cf3f941dded41a1fd22dc /comms
parent0cc87e765f5705ec639a71c71a0830bf104a432d (diff)
downloadfreebsd-ports-gnome-a6f9572095e28dbc47b98f771e105af71117c8ac.tar.gz
freebsd-ports-gnome-a6f9572095e28dbc47b98f771e105af71117c8ac.tar.zst
freebsd-ports-gnome-a6f9572095e28dbc47b98f771e105af71117c8ac.zip
Add patch to fix potential crash on startup
Raster::resize() was being called with a negative width or height due to bad state being stored in the config. This resulted in fldigi crashing before the UI was displayed. This patch works around the problem and has been submitted upstream.
Diffstat (limited to 'comms')
-rw-r--r--comms/fldigi/Makefile2
-rw-r--r--comms/fldigi/files/patch-src_waterfall_raster.cxx13
2 files changed, 14 insertions, 1 deletions
diff --git a/comms/fldigi/Makefile b/comms/fldigi/Makefile
index 198612cc7047..fc541f678220 100644
--- a/comms/fldigi/Makefile
+++ b/comms/fldigi/Makefile
@@ -2,7 +2,7 @@
PORTNAME= fldigi
PORTVERSION= 4.0.17
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= comms hamradio
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}
diff --git a/comms/fldigi/files/patch-src_waterfall_raster.cxx b/comms/fldigi/files/patch-src_waterfall_raster.cxx
new file mode 100644
index 000000000000..339188e80e39
--- /dev/null
+++ b/comms/fldigi/files/patch-src_waterfall_raster.cxx
@@ -0,0 +1,13 @@
+--- src/waterfall/raster.cxx.orig 2018-08-11 23:26:43 UTC
++++ src/waterfall/raster.cxx
+@@ -169,6 +169,10 @@ void Raster::resize(int x, int y, int w,
+ while ((Ndest * rhs) < Hdest) Ndest++;
+ Ndest--;
+
++ if (Wdest < 0)
++ Wdest = 0;
++ if (Hdest < 0)
++ Hdest = 0;
+ unsigned char *tempbuf = new unsigned char [Wdest * Hdest];
+ unsigned char *oldbuf = vidbuf;
+