Fix bxconfigure crash on terminals wider than 200 columns.
A few places created strings based on the terminal width, using fixed-sized buffers and without checking for overflowing them. Fix those, and also replace all other sprintf() calls with snprintf(). Reported by cpet.
This commit is contained in:
@@ -302,9 +302,9 @@ int ls_dispatch (CELL * c)
|
||||
|
||||
while (c -> termkey == 0/* && c->start*/) {
|
||||
hit = FALSE;
|
||||
if (c->redraw && ((*c -> ListPaintProc) != NULL))
|
||||
if (c->redraw && (c->ListPaintProc != NULL))
|
||||
(*c -> ListPaintProc) (c);
|
||||
if (*c -> UpdateStatusProc != NULL)
|
||||
if (c->UpdateStatusProc != NULL)
|
||||
(*c -> UpdateStatusProc) (c);
|
||||
if (c -> termkey == 0) {
|
||||
if ((*c -> OtherGetKeyProc) != NULL && c->other_getkey)
|
||||
|
||||
Reference in New Issue
Block a user