TokTok / toxic

An ncurses-based Tox client
https://toktok.ltd/
GNU General Public License v3.0
29 stars 4 forks source link

fix: make sure realloc() called with a 0 value doesn't abort toxic #337

Closed JFreegman closed 8 months ago

JFreegman commented 8 months ago

This change is Reviewable

robinlinden commented 8 months ago

@JFreegman realloc with a new size of 0 will stop being implementation-defined and become UB in C23. see: https://en.cppreference.com/w/c/memory/realloc

JFreegman commented 8 months ago

@JFreegman realloc with a new size of 0 will stop being implementation-defined and become UB in C23. see: https://en.cppreference.com/w/c/memory/realloc

Good to know. Might as well deal with that now then.