diff options
author | Khem Raj <raj.khem@gmail.com> | 2017-03-06 23:13:36 -0800 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2017-03-11 17:56:41 +0100 |
commit | d6c99da9d058e237a89eaa88eed1af1af8c43114 (patch) | |
tree | 90efefa546b941a680f30f667e392dd1e29c6327 /meta-oe | |
parent | 07b5b960207271fdaeab67f9775fd7acb4c10e8a (diff) | |
download | meta-openembedded-contrib-d6c99da9d058e237a89eaa88eed1af1af8c43114.tar.gz |
t1lib: Fix printf format string errors
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-oe')
-rw-r--r-- | meta-oe/recipes-extended/t1lib/t1lib-5.1.2/format_security.patch | 41 | ||||
-rw-r--r-- | meta-oe/recipes-extended/t1lib/t1lib_5.1.2.bb | 3 |
2 files changed, 43 insertions, 1 deletions
diff --git a/meta-oe/recipes-extended/t1lib/t1lib-5.1.2/format_security.patch b/meta-oe/recipes-extended/t1lib/t1lib-5.1.2/format_security.patch new file mode 100644 index 0000000000..8b4ce400f3 --- /dev/null +++ b/meta-oe/recipes-extended/t1lib/t1lib-5.1.2/format_security.patch @@ -0,0 +1,41 @@ +Fix printf formats to use format qualifiers +fixes + +error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security] + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +Upstream-Status: Pending + +--- a/lib/type1/objects.c ++++ b/lib/type1/objects.c +@@ -957,7 +957,7 @@ + + sprintf(typemsg, "Wrong object type in %s; expected %s, found %s.\n", + name, TypeFmt(expect), TypeFmt(obj->type)); +- IfTrace0(TRUE,typemsg); ++ IfTrace1(TRUE, "%s", typemsg); + + ObjectPostMortem(obj); + +--- a/lib/t1lib/t1subset.c ++++ b/lib/t1lib/t1subset.c +@@ -759,7 +759,7 @@ + tr_len); + T1_PrintLog( "T1_SubsetFont()", err_warn_msg_buf, + T1LOG_DEBUG); +- l+=sprintf( &(trailerbuf[l]), linebuf); /* contains the PostScript trailer */ ++ l+=sprintf( &(trailerbuf[l]), "%s", linebuf); /* contains the PostScript trailer */ + } + + /* compute size of output file */ +--- a/lib/type1/objects.h ++++ b/lib/type1/objects.h +@@ -214,7 +214,7 @@ + /*SHARED*/ + /* NDW: personally, I want to see status and error messages! */ + #define IfTrace0(condition,model) \ +- {if (condition) printf(model);} ++ {if (condition) fputs(model,stdout);} + #define IfTrace1(condition,model,arg0) \ + {if (condition) printf(model,arg0);} + #define IfTrace2(condition,model,arg0,arg1) \ diff --git a/meta-oe/recipes-extended/t1lib/t1lib_5.1.2.bb b/meta-oe/recipes-extended/t1lib/t1lib_5.1.2.bb index 1d670a7d76..826dbda858 100644 --- a/meta-oe/recipes-extended/t1lib/t1lib_5.1.2.bb +++ b/meta-oe/recipes-extended/t1lib/t1lib_5.1.2.bb @@ -9,7 +9,8 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=8ca43cbc842c2336e835926c2166c28b \ SRC_URI = "${DEBIAN_MIRROR}/main/t/t1lib/t1lib_${PV}.orig.tar.gz \ file://configure.patch \ - file://libtool.patch" + file://libtool.patch \ + file://format_security.patch" SRC_URI[md5sum] = "a5629b56b93134377718009df1435f3c" SRC_URI[sha256sum] = "821328b5054f7890a0d0cd2f52825270705df3641dbd476d58d17e56ed957b59" |