Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 1 | From 439e3e35f7fcbff1abb782de4b19b31e43ae3449 Mon Sep 17 00:00:00 2001 |
| 2 | From: Khem Raj <raj.khem@gmail.com> |
| 3 | Date: Tue, 27 Jun 2017 09:59:19 -0700 |
| 4 | Subject: [PATCH] rpcgen: Fix printf formats |
| 5 | |
| 6 | Fixes build with hardening flags |
| 7 | |
| 8 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
| 9 | --- |
| 10 | rpcgen/rpc_hout.c | 2 +- |
| 11 | rpcgen/rpc_tblout.c | 4 ++-- |
| 12 | 2 files changed, 3 insertions(+), 3 deletions(-) |
| 13 | |
| 14 | diff --git a/rpcgen/rpc_hout.c b/rpcgen/rpc_hout.c |
| 15 | index 0ef52df..09a7b57 100644 |
| 16 | --- a/rpcgen/rpc_hout.c |
| 17 | +++ b/rpcgen/rpc_hout.c |
| 18 | @@ -474,7 +474,7 @@ pdeclaration(const char *name, declaration *dec, int tab, |
| 19 | break; |
| 20 | } |
| 21 | } |
| 22 | - f_print(fout, separator ); |
| 23 | + f_print(fout, "%s", separator ); |
| 24 | } |
| 25 | |
| 26 | static int |
| 27 | diff --git a/rpcgen/rpc_tblout.c b/rpcgen/rpc_tblout.c |
| 28 | index d64bfde..fd62a52 100644 |
| 29 | --- a/rpcgen/rpc_tblout.c |
| 30 | +++ b/rpcgen/rpc_tblout.c |
| 31 | @@ -99,7 +99,7 @@ write_table(const definition *def) |
| 32 | } |
| 33 | else { |
| 34 | expected = 1; |
| 35 | - f_print(fout, null_entry); |
| 36 | + f_print(fout, "%s", null_entry); |
| 37 | } |
| 38 | for (proc = vp->procs; proc != NULL; proc = proc->next) { |
| 39 | current = atoi(proc->proc_num); |
| 40 | @@ -139,7 +139,7 @@ write_table(const definition *def) |
| 41 | } |
| 42 | |
| 43 | /* print the table trailer */ |
| 44 | - f_print(fout, tbl_end); |
| 45 | + f_print(fout, "%s", tbl_end); |
| 46 | f_print(fout, tbl_nproc, progvers, progvers, progvers); |
| 47 | } |
| 48 | } |
| 49 | -- |
| 50 | 2.13.2 |
| 51 | |