diff options
author | Eugene Kosov <claprix@yandex.ru> | 2020-10-03 12:38:19 +0300 |
---|---|---|
committer | Eugene Kosov <claprix@yandex.ru> | 2020-10-03 12:38:43 +0300 |
commit | 34cf947ef227276810d206d089feadbd593897ee (patch) | |
tree | 88a0db2c16879d99a78b2b5861fec7a4c7a83fcf /mysys | |
parent | dab56d5e8e9c64d3815594b412521e36ba539f48 (diff) | |
download | mariadb-git-34cf947ef227276810d206d089feadbd593897ee.tar.gz |
UBSAN UndefinedBehaviorSanitizer: undefined-behavior ../mysys/hash.c:798:9
Diffstat (limited to 'mysys')
-rw-r--r-- | mysys/hash.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/mysys/hash.c b/mysys/hash.c index 1270d14c1f6..d5903df40bd 100644 --- a/mysys/hash.c +++ b/mysys/hash.c @@ -792,14 +792,13 @@ void my_hash_replace(HASH *hash, HASH_SEARCH_STATE *current_record, my_bool my_hash_iterate(HASH *hash, my_hash_walk_action action, void *argument) { uint records, i; - HASH_LINK *data; records= hash->records; - data= dynamic_element(&hash->array,0,HASH_LINK*); for (i= 0 ; i < records ; i++) { - if ((*action)(data[i].data, argument)) + if ((*action)(dynamic_element(&hash->array, i, HASH_LINK *)->data, + argument)) return 1; } return 0; |