https://git.reactos.org/?p=reactos.git;a=commitdiff;h=0b9cbc5179a929fbcea0d…
commit 0b9cbc5179a929fbcea0d3f4f5f667ff565b348a
Author: Serge Gautherie <reactos-git_serge_171003(a)gautherie.fr>
AuthorDate: Mon Jun 1 21:29:02 2020 +0200
Commit: Thomas Faber <thomas.faber(a)reactos.org>
CommitDate: Sat Jun 27 14:38:21 2020 +0200
[CRT] _onexit(): Fix 'memcpy()' size
Cherry-pick
https://source.winehq.org/git/wine.git/commit/70bff7377dbe9bdaaac5e86c49ee4…
---
sdk/lib/crt/stdlib/atexit.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sdk/lib/crt/stdlib/atexit.c b/sdk/lib/crt/stdlib/atexit.c
index 49247baddc7..32c5f7effaf 100644
--- a/sdk/lib/crt/stdlib/atexit.c
+++ b/sdk/lib/crt/stdlib/atexit.c
@@ -76,7 +76,7 @@ _onexit_t CDECL _onexit(_onexit_t func)
UNLOCK_EXIT;
return NULL;
}
- memcpy (newtable, atexit_table, atexit_table_size);
+ memcpy (newtable, atexit_table, atexit_table_size*sizeof(_onexit_t));
atexit_table_size += 32;
free (atexit_table);
atexit_table = newtable;