mirror of
https://github.com/rkd77/elinks.git
synced 2024-06-28 01:35:32 +00:00
f6f5eeceb7
screen_driver_change_hook was comparing only strlen(name) characters and ignoring the '\0'. To reproduce the bug in ELinks 0.11.3 and ELinks 0.12.GIT: - Run TERM=screen elinks. - In another terminal, run TERM=scr elinks. Quit this slave ELinks. - Open the terminal options dialog and set 16 colors. - Open the option manager and change the terminal.scr.colors option to 1 and back to 0. - Note that ELinks no longer displays colors. That bug could be fixed just by using len+1 instead of len. However, there is also another bug: memcmp may compare the specified number of bytes, even if some of the earlier ones differ; thus, it could in principle read past the end of the malloc block and thereby crash ELinks. Using strcmp may be a little slower but I do not believe it could become a bottleneck. |
||
---|---|---|
.. | ||
color.c | ||
color.h | ||
draw.c | ||
draw.h | ||
event.c | ||
event.h | ||
hardio.c | ||
hardio.h | ||
itrm.h | ||
kbd.c | ||
kbd.h | ||
key.inc | ||
Makefile | ||
mouse.c | ||
mouse.h | ||
palette.inc | ||
screen.c | ||
screen.h | ||
tab.c | ||
tab.h | ||
terminal.c | ||
terminal.h | ||
TODO | ||
window.c | ||
window.h |