Selaa lähdekoodia

* src/graphics.c:

+ Fixed a buffer overflow due to bad signed/unsigned handling.
  * src/event.c:
    + Disallow zero width or height in the X11 driver.
    + Fixed resizing in ncurses and slang.
  * THANKS:
    + Added the Source Mage maintainer.
tags/v0.99.beta14
Sam Hocevar sam 21 vuotta sitten
vanhempi
commit
24b0e23466
3 muutettua tiedostoa jossa 7 lisäystä ja 4 poistoa
  1. +1
    -0
      THANKS
  2. +4
    -2
      src/event.c
  3. +2
    -2
      src/graphics.c

+ 1
- 0
THANKS Näytä tiedosto

@@ -3,6 +3,7 @@ $Id$
Derk-Jan Hartman <thedj@users.sourceforge.net> - Gentoo ebuild file
Gildas Bazin <gbazin@netcourrier.com> - win32 driver improvements
Jan Hubicka <hubicka@freesoft.cz> - aafire
Ladislav Hagara <hgr@vabo.cz> - Source Mage spell
Michele Bini <mibin@tin.it> - original SDL plasma
Philip Balinov - Slackware package
Richard Zidlicky <rz@linux-m68k.org> - rpm specfile


+ 4
- 2
src/event.c Näytä tiedosto

@@ -278,7 +278,7 @@ static unsigned int _lowlevel_event(void)
h = (xevent.xconfigure.height + x11_font_height / 3)
/ x11_font_height;

if(w == _caca_width && h == _caca_height)
if(!w || !h || (w == _caca_width && h == _caca_height))
continue;

x11_new_width = w;
@@ -370,6 +370,7 @@ static unsigned int _lowlevel_event(void)
if(_caca_resize_event)
{
_caca_resize_event = 0;
_caca_resize = 1;
return CACA_EVENT_RESIZE;
}

@@ -553,6 +554,7 @@ static unsigned int _lowlevel_event(void)
if(_caca_resize_event)
{
_caca_resize_event = 0;
_caca_resize = 1;
return CACA_EVENT_RESIZE;
}

@@ -723,7 +725,7 @@ static unsigned int _lowlevel_event(void)
#if defined(USE_SLANG) || defined(USE_NCURSES) || defined(USE_CONIO)
static void _push_event(unsigned int event)
{
if(events == EVENTBUF_LEN)
if(!event || events == EVENTBUF_LEN)
return;
eventbuf[events] = event;
events++;


+ 2
- 2
src/graphics.c Näytä tiedosto

@@ -443,9 +443,9 @@ void caca_putstr(int x, int y, char const *s)

if(x < 0)
{
len -= -x;
if(len < 0)
if(len < (unsigned int)-x)
return;
len -= -x;
s += -x;
x = 0;
}


Ladataan…
Peruuta
Tallenna