1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-06-28 01:35:32 +00:00
elinks/src/terminal
Kalle Olavi Niemitalo f6f5eeceb7 Compare screen_driver.name with strcmp, not memcmp.
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.
2007-05-26 21:14:50 +03:00
..
color.c Bug 871, 752: Lock down enum color_mode and change option help to match. 2006-12-25 11:51:24 +02:00
color.h Bug 871, 752: Lock down enum color_mode and change option help to match. 2006-12-25 11:51:24 +02:00
draw.c Bug 914: Don't let UTF-8 I/O affect internal representations. 2007-05-20 15:31:02 +03:00
draw.h Bug 914: Don't let UTF-8 I/O affect internal representations. 2007-05-20 15:31:02 +03:00
event.c Bug 914: Don't let UTF-8 I/O affect internal representations. 2007-05-20 15:31:02 +03:00
event.h terminal UTF-8: check_kbd_label_key() allows non-ASCII characters again. 2006-08-13 23:48:18 +03:00
hardio.c Remove now useless $Id: lines. 2005-10-21 09:14:07 +02:00
hardio.h Remove empty lines in start of header files 2005-11-15 11:33:27 +01:00
itrm.h Bug 724: Quadruple ITRM_IN_QUEUE_SIZE from 16 to 64 bytes. 2006-10-30 23:15:43 +02:00
kbd.c unblock_itrm(),block_itrm(): drop unused parameter fd. 2007-03-05 22:54:24 +01:00
kbd.h unblock_itrm(),block_itrm(): drop unused parameter fd. 2007-03-05 22:54:24 +01:00
key.inc Remove now useless $Id: lines. 2005-10-21 09:14:07 +02:00
Makefile path_to_top -> top_builddir 2005-10-20 04:00:35 +02:00
mouse.c terminal: Define separate structs for events passed via the interlink socket. 2006-08-06 20:02:39 +00:00
mouse.h terminal: Define separate structs for events passed via the interlink socket. 2006-08-06 20:02:39 +00:00
palette.inc palette.inc: Comment fixes. 2007-03-03 09:46:51 +02:00
screen.c Compare screen_driver.name with strcmp, not memcmp. 2007-05-26 21:14:50 +03:00
screen.h Modularise src/terminal 2006-05-20 15:01:24 +00:00
tab.c Type-check button arguments of msg_box. 2007-03-10 23:50:56 +02:00
tab.h Move delayed_open to src/terminal/tab.c 2006-01-16 19:28:03 +00:00
terminal.c Don't mark undisplayed names of modules for translation. 2007-03-23 00:51:56 +02:00
terminal.h Bug 914: Don't let UTF-8 I/O affect internal representations. 2007-05-20 15:31:02 +03:00
TODO Initial commit of the HEAD branch of the ELinks CVS repository, as of 2005-09-15 15:58:31 +02:00
window.c Don't let move_current_tab move the tab beyond the main menu. 2006-05-14 22:17:26 +03:00
window.h New tabs always open below dialogs, never above. 2006-05-14 14:03:17 +03:00