between those 2 lines m->friendlist may point to old already freed address
|
Friend *newfriendlist = (Friend *)realloc(m->friendlist, num * sizeof(Friend)); |
|
|
|
if (newfriendlist == nullptr) { |
|
return -1; |
|
} |
|
|
|
m->friendlist = newfriendlist; |
ToxAV has other threads, so this may be accessed while invalid.
between those 2 lines
m->friendlistmay point to old already freed addressc-toxcore/toxcore/Messenger.c
Lines 67 to 73 in 5b14542
ToxAV has other threads, so this may be accessed while invalid.