diff options
| author | Peter Jones <pjones@redhat.com> | 2021-03-11 20:49:41 -0500 |
|---|---|---|
| committer | Javier Martinez Canillas <javier@dowhile0.org> | 2021-03-12 10:15:01 +0100 |
| commit | 9e8dde5438ece7ce1c2ecaeb754298d5bcb4bea8 (patch) | |
| tree | 146bd299fbf8fa5fed04552b90cb1d7142ba8231 /lib/variables.c | |
| parent | 2a2ae40523fc9c735771ee3a4acfb866fdf0e586 (diff) | |
| download | efi-boot-shim-9e8dde5438ece7ce1c2ecaeb754298d5bcb4bea8.tar.gz efi-boot-shim-9e8dde5438ece7ce1c2ecaeb754298d5bcb4bea8.zip | |
Fix a plausible NULL dereference.
scan-build kindly pointed out:
| shim.c:1568:10: warning: Array access (from variable 'start') results in a null pointer dereference [core.NullDereference]
| while (start[loader_len++] != L'\0');
| ^~~~~~~~~~~~~~~~~~~
| 1 warning generated.
It thinks that because of a bad assumption it's making because of the
test immediately before it, which isn't currently necessary /at all/.
In fact, neither is this loop; it appears to be vestigial and the goal
was done in the loop above it.
This patch just solves for how much space is left arithmetically
instead.
Signed-off-by: Peter Jones <pjones@redhat.com>
Diffstat (limited to 'lib/variables.c')
0 files changed, 0 insertions, 0 deletions
