diff options
author | Jeff Johnston <jjohnstn@redhat.com> | 2022-03-07 15:35:02 -0500 |
---|---|---|
committer | Jeff Johnston <jjohnstn@redhat.com> | 2022-03-07 15:35:02 -0500 |
commit | 5fca4e0f180eec4e2507128f1ddf3cb2863f9939 (patch) | |
tree | cd62a2301a818eeb88b89fb8f0b365005eaeecd0 | |
parent | 9e1b3294311d60ef0fe52c1498df0ab2bc093073 (diff) | |
download | newlib-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.c | 2 |
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); } |