From: Andreas Reichel <[email protected]> Include null terminating byte when calling bgenv_set.
Signed-off-by: Andreas Reichel <[email protected]> --- env/env_api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/env/env_api.c b/env/env_api.c index 8ee881a..76f7b93 100644 --- a/env/env_api.c +++ b/env/env_api.c @@ -176,7 +176,7 @@ int ebg_env_setglobalstate(ebgenv_t *e, uint16_t ustate) (void)snprintf(buffer, sizeof(buffer), "%d", ustate); res = bgenv_set((BGENV *)e->bgenv, "ustate", "String", buffer, - strlen(buffer)); + strlen(buffer) + 1); if (ustate != USTATE_OK) { return res; -- 2.14.2 -- You received this message because you are subscribed to the Google Groups "EFI Boot Guard" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/efibootguard-dev/20171103122121.27121-2-andreas.reichel.ext%40siemens.com. For more options, visit https://groups.google.com/d/optout.
