aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Johnston <jjohnstn@redhat.com>2022-03-07 15:35:02 -0500
committerJeff Johnston <jjohnstn@redhat.com>2022-03-07 15:35:02 -0500
commit5fca4e0f180eec4e2507128f1ddf3cb2863f9939 (patch)
treecd62a2301a818eeb88b89fb8f0b365005eaeecd0
parent9e1b3294311d60ef0fe52c1498df0ab2bc093073 (diff)
downloadnewlib-5fca4e0f180eec4e2507128f1ddf3cb2863f9939.zip
newlib-5fca4e0f180eec4e2507128f1ddf3cb2863f9939.tar.gz
newlib-5fca4e0f180eec4e2507128f1ddf3cb2863f9939.tar.bz2
Fix Bug libc/28945
- apply fix from Tom de Vries <vries@gcc.gnu.org> to have calloc zero out storage for nvptx calloc function
-rw-r--r--newlib/libc/machine/nvptx/calloc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/newlib/libc/machine/nvptx/calloc.c b/newlib/libc/machine/nvptx/calloc.c
index e83a32d..f0ccf90 100644
--- a/newlib/libc/machine/nvptx/calloc.c
+++ b/newlib/libc/machine/nvptx/calloc.c
@@ -22,5 +22,5 @@ calloc (size_t size, size_t len)
void *p = malloc (size * len);
if (!p)
return p;
- return memset (p, 0, len);
+ return memset (p, 0, size * len);
}