diff options
| author | Kees Cook <kees@outflux.net> | 2014-04-11 14:41:22 -0400 |
|---|---|---|
| committer | Peter Jones <pjones@redhat.com> | 2014-04-11 14:41:22 -0400 |
| commit | 47a9d2c908078ff79c4a4043855ec499241c8977 (patch) | |
| tree | b69b9617b5680d8a94d92ff4afbada5710487a3a /MokManager.c | |
| parent | cf90edfff585cfb6d51f0b4992c7f4fc9195c4c2 (diff) | |
| download | efi-boot-shim-47a9d2c908078ff79c4a4043855ec499241c8977.tar.gz efi-boot-shim-47a9d2c908078ff79c4a4043855ec499241c8977.zip | |
additional bounds-checking on section sizes
This adds additional bounds-checking on the section sizes. Also adds
-Wsign-compare to the Makefile and replaces some signed variables with
unsigned counteparts for robustness.
Signed-off-by: Kees Cook <kees@ubuntu.com>
Diffstat (limited to 'MokManager.c')
| -rw-r--r-- | MokManager.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/MokManager.c b/MokManager.c index f5ed379c..3da61f43 100644 --- a/MokManager.c +++ b/MokManager.c @@ -440,7 +440,7 @@ static EFI_STATUS list_keys (void *KeyList, UINTN KeyListSize, CHAR16 *title) MokListNode *keys = NULL; INTN key_num = 0; CHAR16 **menu_strings; - int i; + unsigned int i; if (KeyListSize < (sizeof(EFI_SIGNATURE_LIST) + sizeof(EFI_SIGNATURE_DATA))) { @@ -491,7 +491,7 @@ static EFI_STATUS list_keys (void *KeyList, UINTN KeyListSize, CHAR16 *title) static UINT8 get_line (UINT32 *length, CHAR16 *line, UINT32 line_max, UINT8 show) { EFI_INPUT_KEY key; - int count = 0; + unsigned int count = 0; do { key = console_get_keystroke(); @@ -640,7 +640,7 @@ static EFI_STATUS match_password (PASSWORD_CRYPT *pw_crypt, CHAR16 password[PASSWORD_MAX]; UINT32 pw_length; UINT8 fail_count = 0; - int i; + unsigned int i; if (pw_crypt) { auth_hash = pw_crypt->hash; |
