1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-21 04:06:46 +00:00

graphics/openjpeg: Fix CVE-2017-14041

The port had 5 CVEs reported in
vuxml entry < http://www.vuxml.org/freebsd/11dc3890-0e64-11e8-99b0-d017c2987f9a.html >.
These patches are fix for CVE-2017-1404

Reported by:	Philip Jocks <pj@netzkommune.de>
Approved by:	sunpoet (maintainer)
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D16685
This commit is contained in:
Mahdi Mokhtari 2018-08-13 20:31:33 +00:00
parent 33f24a0416
commit e720cb2863
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=477112
3 changed files with 23 additions and 0 deletions

View File

@ -3,6 +3,7 @@
PORTNAME= openjpeg
PORTVERSION= 2.3.0
PORTREVISION= 1
DISTVERSIONPREFIX= v
CATEGORIES= graphics

View File

@ -0,0 +1,11 @@
--- src/bin/jp3d/convert.c.orig 2018-08-02 17:40:37 UTC
+++ src/bin/jp3d/convert.c
@@ -297,7 +297,7 @@ opj_volume_t* pgxtovolume(char *relpath,
fprintf(stdout, "[INFO] Loading %s \n", pgxfiles[pos]);
fseek(f, 0, SEEK_SET);
- fscanf(f, "PG%[ \t]%c%c%[ \t+-]%d%[ \t]%d%[ \t]%d", temp, &endian1, &endian2,
+ fscanf(f, "PG%31[ \t]%c%c%31[ \t+-]%d%31[ \t]%d%31[ \t]%d", temp, &endian1, &endian2
signtmp, &prec, temp, &w, temp, &h);
i = 0;

View File

@ -0,0 +1,11 @@
--- src/bin/jpwl/convert.c.orig 2018-08-02 17:47:37 UTC
+++ src/bin/jpwl/convert.c
@@ -1348,7 +1348,7 @@ opj_image_t* pgxtoimage(const char *file
}
fseek(f, 0, SEEK_SET);
- if (fscanf(f, "PG%[ \t]%c%c%[ \t+-]%d%[ \t]%d%[ \t]%d", temp, &endian1,
+ if (fscanf(f, "PG%31[ \t]%c%c%31[ \t+-]%d%31[ \t]%d%31[ \t]%d", temp, &endian1,
&endian2, signtmp, &prec, temp, &w, temp, &h) != 9) {
fprintf(stderr,
"ERROR: Failed to read the right number of element from the fscanf() function!\n");