diff options
author | Heinrich Schuchardt | 2019-03-19 12:30:27 +0100 |
---|---|---|
committer | Heinrich Schuchardt | 2019-03-20 18:16:53 +0100 |
commit | bd3b7478d1e17b4d487d276f5cc0e4f4ef9fc4b7 (patch) | |
tree | f0f05fc2515de8f831805816761b9f3edc374084 /lib | |
parent | 306b16718edddd660b84bf3c6627ce5d41b53ce7 (diff) |
efi_loader: endless loop in add_strings_package()
Avoid an endless loop in add_strings_package().
Suggested-by: Takahiro Akashi <takahiro.akashi@linaro.org>
Reported-by: Coverity (CID 185833)
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/efi_loader/efi_hii.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/efi_loader/efi_hii.c b/lib/efi_loader/efi_hii.c index 3a966fa4dff..61b71dec621 100644 --- a/lib/efi_loader/efi_hii.c +++ b/lib/efi_loader/efi_hii.c @@ -227,9 +227,8 @@ out: error: if (stbl) { free(stbl->language); - if (idx > 0) - while (--idx >= 0) - free(stbl->strings[idx].string); + while (idx > 0) + free(stbl->strings[--idx].string); free(stbl->strings); } free(stbl); |