diff options
| author | Gary Ching-Pang Lin <glin@suse.com> | 2012-09-20 15:54:57 +0800 |
|---|---|---|
| committer | Gary Ching-Pang Lin <glin@suse.com> | 2012-09-20 15:54:57 +0800 |
| commit | f78ff3bf0e985ea5b1581a9712330ecd02015101 (patch) | |
| tree | a73159e11630362c171ddc711eb79641ff1d0e6d | |
| parent | ea8ee44476028bedafe434d5c5027425f3a47538 (diff) | |
| download | efi-boot-shim-f78ff3bf0e985ea5b1581a9712330ecd02015101.tar.gz efi-boot-shim-f78ff3bf0e985ea5b1581a9712330ecd02015101.zip | |
Make sure the time string is set
| -rw-r--r-- | MokManager.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/MokManager.c b/MokManager.c index 7bc45e96..46384fc2 100644 --- a/MokManager.c +++ b/MokManager.c @@ -246,11 +246,13 @@ static void print_x509_time (ASN1_TIME *time, CHAR16 *name) { CHAR16 time_string[30]; - if(time->type == V_ASN1_UTCTIME) + if (time->type == V_ASN1_UTCTIME) { print_x509_UTCTIME_time(time, time_string); - - if(time->type == V_ASN1_GENERALIZEDTIME) + } else if (time->type == V_ASN1_GENERALIZEDTIME) { print_x509_GENERALIZEDTIME_time(time, time_string); + } else { + time_string[0] = '\0'; + } Print(L" %s:\n %s\n", name, time_string); } |
