cii icon indicating copy to clipboard operation
cii copied to clipboard

Undefined behaviour in text.c

Open poldy opened this issue 3 years ago • 0 comments

This is just a small issue. When I used the "-fsanitize=undefined" option to clang, it complained that performing arithmetic on a NULL pointer is undefined behaviour at L49 of text.c. The problem is that current->avail is NULL at initialisation time, so the addition is undefined (nasal daemons, etc. :-) ). This patch fixes the warning.

poldy avatar Jun 13 '21 20:06 poldy