Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1220799 > unrolled thread

[PATCH] MODSIGN: Fix a compilation warning in extract-cert

Started byDavid Howells <dhowells@redhat.com>
First post2015-09-08 15:50 +0200
Last post2015-09-08 16:10 +0200
Articles 2 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH] MODSIGN: Fix a compilation warning in extract-cert David Howells <dhowells@redhat.com> - 2015-09-08 15:50 +0200
    Re: [PATCH] MODSIGN: Fix a compilation warning in extract-cert David Howells <dhowells@redhat.com> - 2015-09-08 16:10 +0200

#1220799 — [PATCH] MODSIGN: Fix a compilation warning in extract-cert

FromDavid Howells <dhowells@redhat.com>
Date2015-09-08 15:50 +0200
Subject[PATCH] MODSIGN: Fix a compilation warning in extract-cert
Message-ID<q6rrA-5QO-19@gated-at.bofh.it>
Fix the following warning when compiling extract-cert:

scripts/extract-cert.c: In function ‘write_cert’:
scripts/extract-cert.c:89:2: warning: format not a string literal and no format arguments [-Wformat-security]
  ERR(!i2d_X509_bio(wb, x509), cert_dst);
  ^

whereby the ERR() macro is taking cert_dst as the format string.  "%s"
should be used as the format string as the path could contain special
characters.

Reported-by: Jim Davis <jim.epost@gmail.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by : David Woodhouse <david.woodhouse@intel.com>
---

 scripts/extract-cert.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/extract-cert.c b/scripts/extract-cert.c
index fd0db015c65c..10d23ca9f617 100644
--- a/scripts/extract-cert.c
+++ b/scripts/extract-cert.c
@@ -86,7 +86,7 @@ static void write_cert(X509 *x509)
 		ERR(!wb, "%s", cert_dst);
 	}
 	X509_NAME_oneline(X509_get_subject_name(x509), buf, sizeof(buf));
-	ERR(!i2d_X509_bio(wb, x509), cert_dst);
+	ERR(!i2d_X509_bio(wb, x509), "%s", cert_dst);
 	if (kbuild_verbose)
 		fprintf(stderr, "Extracted cert: %s\n", buf);
 }

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1220817

FromDavid Howells <dhowells@redhat.com>
Date2015-09-08 16:10 +0200
Message-ID<q6rKX-6sO-45@gated-at.bofh.it>
In reply to#1220799
This patch is aimed at security/next.

David
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web