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.
This commit is contained in:
parent
11818b9043
commit
bdfc42b73f
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=476948
2 changed files with 14 additions and 1 deletions
|
@ -2,7 +2,7 @@
|
|||
|
||||
PORTNAME= fldigi
|
||||
PORTVERSION= 4.0.17
|
||||
PORTREVISION= 2
|
||||
PORTREVISION= 3
|
||||
CATEGORIES= comms hamradio
|
||||
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}
|
||||
|
||||
|
|
13
comms/fldigi/files/patch-src_waterfall_raster.cxx
Normal file
13
comms/fldigi/files/patch-src_waterfall_raster.cxx
Normal file
|
@ -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;
|
||||
|
Loading…
Reference in a new issue