diff options
author | weidai <weidai11@users.noreply.github.com> | 2003-08-04 19:00:41 +0000 |
---|---|---|
committer | weidai <weidai11@users.noreply.github.com> | 2003-08-04 19:00:41 +0000 |
commit | 89862d12200bebff8ba59dcbc19eafdb266d6a0d (patch) | |
tree | fb58ae8f9f7914a6a69f7becead49588338698bd /dll.cpp | |
parent | 5c3dbb91a256f810d30e0c8940bf3e90aa70a4a2 (diff) | |
download | cryptopp-git-89862d12200bebff8ba59dcbc19eafdb266d6a0d.tar.gz |
guard against potential integer overflow in allocators
Diffstat (limited to 'dll.cpp')
-rw-r--r-- | dll.cpp | 11 |
1 files changed, 1 insertions, 10 deletions
@@ -56,18 +56,9 @@ static PDelete s_pDelete = NULL; static void * CRYPTOPP_CDECL New (size_t size) { - new_handler newHandler = set_new_handler(NULL); - if (newHandler) - set_new_handler(newHandler); - void *p; while (!(p = malloc(size))) - { - if (newHandler) - newHandler(); - else - throw std::bad_alloc(); - } + CallNewHandler(); return p; } |