Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(303)

Unified Diff: host/lib/file_keys.c

Issue 3136017: Add additional sanity checks to RSA verification code. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/vboot_reference.git
Patch Set: Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « host/include/signature_digest.h ('k') | host/lib/host_key.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: host/lib/file_keys.c
diff --git a/host/lib/file_keys.c b/host/lib/file_keys.c
index 181879da6801d8078c09529380d01bb13835f706..0c57dff82bf1b46048951b60007059d2418e31bf 100644
--- a/host/lib/file_keys.c
+++ b/host/lib/file_keys.c
@@ -82,7 +82,7 @@ uint8_t* DigestFile(char* input_file, int sig_algorithm) {
}
uint8_t* SignatureFile(const char* input_file, const char* key_file,
- int algorithm) {
+ unsigned int algorithm) {
char* sign_utility = "./sign_data.sh";
char* cmd; /* Command line to invoke. */
int cmd_len;
@@ -99,7 +99,7 @@ uint8_t* SignatureFile(const char* input_file, const char* key_file,
strlen(input_file) +
1); /* For the trailing '\0'. */
cmd = (char*) Malloc(cmd_len);
- snprintf(cmd, cmd_len, "%s %d %s %s", sign_utility, algorithm, key_file,
+ snprintf(cmd, cmd_len, "%s %u %s %s", sign_utility, algorithm, key_file,
input_file);
cmd_out = popen(cmd, "r");
Free(cmd);
« no previous file with comments | « host/include/signature_digest.h ('k') | host/lib/host_key.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698