diff --git a/include/str.h b/include/str.h index 14089c7..a6fbfef 100644 --- a/include/str.h +++ b/include/str.h @@ -55,7 +55,7 @@ strndupa(const CHAR8 * const src, const UINTN srcmax) return news; len = strnlena(src, srcmax); - news = AllocateZeroPool(len); + news = AllocateZeroPool(len + 1); if (news) strncpya(news, src, len); return news;