summaryrefslogtreecommitdiff
path: root/comms/fldigi
diff options
context:
space:
mode:
authorStephen Hurd <shurd@FreeBSD.org>2018-08-11 23:32:35 +0000
committerStephen Hurd <shurd@FreeBSD.org>2018-08-11 23:32:35 +0000
commitbdfc42b73f04848464b93d68833eebd9f40c7ca8 (patch)
treeb348f9d3ae19c36d1a1cf3f941dded41a1fd22dc /comms/fldigi
parent11818b9043b34bfbd3f547d97a4c9d2df426f745 (diff)
downloadfreebsd-ports-bdfc42b73f04848464b93d68833eebd9f40c7ca8.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/fldigi')
-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;
+