You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If realloc fail in either statement, it set h->keys or h->vals to NULL and leak original pointer value. Any attempt to deref new value of h->keys or h->vals will lead to undefined behaviors.
Should we assign result of memory allocation to a temporary variable and perform check before reassign to HashTable's internal data?
The text was updated successfully, but these errors were encountered:
As I read file
pandas/_libs/src/klib/khash.h
, I notice lines 226, 227 in macrokh_resize_##name
(source)If realloc fail in either statement, it set h->keys or h->vals to NULL and leak original pointer value. Any attempt to deref new value of h->keys or h->vals will lead to undefined behaviors.
Should we assign result of memory allocation to a temporary variable and perform check before reassign to HashTable's internal data?
The text was updated successfully, but these errors were encountered: