summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/str.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/str.h b/include/str.h
index 14089c76..a6fbfefd 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;