summaryrefslogtreecommitdiffstats
path: root/external/meta-openembedded/meta-oe/recipes-extended/t1lib/t1lib-5.1.2/format_security.patch
diff options
context:
space:
mode:
authorToshikazuOhiwa <toshikazu_ohiwa@mail.toyota.co.jp>2020-03-30 09:24:26 +0900
committerToshikazuOhiwa <toshikazu_ohiwa@mail.toyota.co.jp>2020-03-30 09:24:26 +0900
commit5b80bfd7bffd4c20d80b7c70a7130529e9a755dd (patch)
treeb4bb18dcd1487dbf1ea8127e5671b7bb2eded033 /external/meta-openembedded/meta-oe/recipes-extended/t1lib/t1lib-5.1.2/format_security.patch
parent706ad73eb02caf8532deaf5d38995bd258725cb8 (diff)
agl-basesystem
Diffstat (limited to 'external/meta-openembedded/meta-oe/recipes-extended/t1lib/t1lib-5.1.2/format_security.patch')
-rw-r--r--external/meta-openembedded/meta-oe/recipes-extended/t1lib/t1lib-5.1.2/format_security.patch58
1 files changed, 58 insertions, 0 deletions
diff --git a/external/meta-openembedded/meta-oe/recipes-extended/t1lib/t1lib-5.1.2/format_security.patch b/external/meta-openembedded/meta-oe/recipes-extended/t1lib/t1lib-5.1.2/format_security.patch
new file mode 100644
index 00000000..bc2476bf
--- /dev/null
+++ b/external/meta-openembedded/meta-oe/recipes-extended/t1lib/t1lib-5.1.2/format_security.patch
@@ -0,0 +1,58 @@
+From cea83003de3ffebde92becd1e599fe3b28f0a7c4 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 6 Mar 2017 23:13:36 -0800
+Subject: [PATCH] t1lib: Fix printf format string errors
+
+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
+
+---
+ lib/t1lib/t1subset.c | 2 +-
+ lib/type1/objects.c | 2 +-
+ lib/type1/objects.h | 2 +-
+ 3 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/lib/t1lib/t1subset.c b/lib/t1lib/t1subset.c
+index da427b2..e76974f 100644
+--- a/lib/t1lib/t1subset.c
++++ b/lib/t1lib/t1subset.c
+@@ -759,7 +759,7 @@ char *T1_SubsetFont( int FontID,
+ 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 */
+diff --git a/lib/type1/objects.c b/lib/type1/objects.c
+index c413a0f..f828e6a 100644
+--- a/lib/type1/objects.c
++++ b/lib/type1/objects.c
+@@ -957,7 +957,7 @@ struct xobject *TypeErr(name, obj, expect, ret) /* non-ANSI avoids overly strict
+
+ 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);
+
+diff --git a/lib/type1/objects.h b/lib/type1/objects.h
+index 13cbae7..3a1d337 100644
+--- a/lib/type1/objects.h
++++ b/lib/type1/objects.h
+@@ -214,7 +214,7 @@ struct xobject {
+ /*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) \