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 | |
parent | 07b5b960207271fdaeab67f9775fd7acb4c10e8a (diff) | |
download | meta-openembedded-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>
-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 000000000..8b4ce400f --- /dev/null +++ b/meta-oe/recipes-extended/t1lib/t1lib-5.1.2/format_security.patch | |||
@@ -0,0 +1,41 @@ | |||
1 | Fix printf formats to use format qualifiers | ||
2 | fixes | ||
3 | |||
4 | error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security] | ||
5 | |||
6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
7 | Upstream-Status: Pending | ||
8 | |||
9 | --- a/lib/type1/objects.c | ||
10 | +++ b/lib/type1/objects.c | ||
11 | @@ -957,7 +957,7 @@ | ||
12 | |||
13 | sprintf(typemsg, "Wrong object type in %s; expected %s, found %s.\n", | ||
14 | name, TypeFmt(expect), TypeFmt(obj->type)); | ||
15 | - IfTrace0(TRUE,typemsg); | ||
16 | + IfTrace1(TRUE, "%s", typemsg); | ||
17 | |||
18 | ObjectPostMortem(obj); | ||
19 | |||
20 | --- a/lib/t1lib/t1subset.c | ||
21 | +++ b/lib/t1lib/t1subset.c | ||
22 | @@ -759,7 +759,7 @@ | ||
23 | tr_len); | ||
24 | T1_PrintLog( "T1_SubsetFont()", err_warn_msg_buf, | ||
25 | T1LOG_DEBUG); | ||
26 | - l+=sprintf( &(trailerbuf[l]), linebuf); /* contains the PostScript trailer */ | ||
27 | + l+=sprintf( &(trailerbuf[l]), "%s", linebuf); /* contains the PostScript trailer */ | ||
28 | } | ||
29 | |||
30 | /* compute size of output file */ | ||
31 | --- a/lib/type1/objects.h | ||
32 | +++ b/lib/type1/objects.h | ||
33 | @@ -214,7 +214,7 @@ | ||
34 | /*SHARED*/ | ||
35 | /* NDW: personally, I want to see status and error messages! */ | ||
36 | #define IfTrace0(condition,model) \ | ||
37 | - {if (condition) printf(model);} | ||
38 | + {if (condition) fputs(model,stdout);} | ||
39 | #define IfTrace1(condition,model,arg0) \ | ||
40 | {if (condition) printf(model,arg0);} | ||
41 | #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 1d670a7d7..826dbda85 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 \ | |||
9 | 9 | ||
10 | SRC_URI = "${DEBIAN_MIRROR}/main/t/t1lib/t1lib_${PV}.orig.tar.gz \ | 10 | SRC_URI = "${DEBIAN_MIRROR}/main/t/t1lib/t1lib_${PV}.orig.tar.gz \ |
11 | file://configure.patch \ | 11 | file://configure.patch \ |
12 | file://libtool.patch" | 12 | file://libtool.patch \ |
13 | file://format_security.patch" | ||
13 | SRC_URI[md5sum] = "a5629b56b93134377718009df1435f3c" | 14 | SRC_URI[md5sum] = "a5629b56b93134377718009df1435f3c" |
14 | SRC_URI[sha256sum] = "821328b5054f7890a0d0cd2f52825270705df3641dbd476d58d17e56ed957b59" | 15 | SRC_URI[sha256sum] = "821328b5054f7890a0d0cd2f52825270705df3641dbd476d58d17e56ed957b59" |
15 | 16 | ||