print/freetype2: apply CVE-2018-6942 fix
PR: 227568 Submitted by: lightside@gmx.com Obtained from: upstream (freetype 2.9.1) Approved by: ports-secteam blanket
This commit is contained in:
parent
0f4841ed41
commit
6ad085e307
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/branches/2018Q2/; revision=468891
@ -3,7 +3,7 @@
|
||||
|
||||
PORTNAME= freetype2
|
||||
PORTVERSION= 2.8
|
||||
PORTREVISION= 1
|
||||
PORTREVISION= 2
|
||||
CATEGORIES= print
|
||||
MASTER_SITES= http://savannah.nongnu.org/download/freetype/ \
|
||||
SF/freetype/${PORTNAME}/${PORTVERSION:C/^([0-9]+\.[0-9]+\.[0-9]+).*/\1/}/ \
|
||||
|
24
print/freetype2/files/patch-CVE-2018-6942
Normal file
24
print/freetype2/files/patch-CVE-2018-6942
Normal file
@ -0,0 +1,24 @@
|
||||
# * src/truetype/ttinterp.c (Ins_GETVARIATION): Avoid NULL reference.
|
||||
# https://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?id=29c759284e305ec428703c9a5831d0b1fc3497ef
|
||||
|
||||
--- src/truetype/ttinterp.c.orig 2017-05-03 21:42:13 UTC
|
||||
+++ src/truetype/ttinterp.c
|
||||
@@ -7470,8 +7470,16 @@
|
||||
return;
|
||||
}
|
||||
|
||||
- for ( i = 0; i < num_axes; i++ )
|
||||
- args[i] = coords[i] >> 2; /* convert 16.16 to 2.14 format */
|
||||
+ if ( coords )
|
||||
+ {
|
||||
+ for ( i = 0; i < num_axes; i++ )
|
||||
+ args[i] = coords[i] >> 2; /* convert 16.16 to 2.14 format */
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ for ( i = 0; i < num_axes; i++ )
|
||||
+ args[i] = 0;
|
||||
+ }
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user