mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2025-12-30 16:40:09 +01:00
Coverity #488: Avoid smashing an array on malformed config files.
This commit is contained in:
parent
250a39279c
commit
9707962ca5
2 changed files with 8 additions and 2 deletions
|
|
@ -1,3 +1,9 @@
|
|||
2006-04-06 Adam Jackson <ajax@freedesktop.org>
|
||||
|
||||
* hw/xfree86/parser/Monitor.c:
|
||||
Coverity #488: Avoid smashing an array on malformed config
|
||||
files.
|
||||
|
||||
2006-04-06 Adam Jackson <ajax@freedesktop.org>
|
||||
|
||||
* hw/dmx/glxProxy/glxsingle.c:
|
||||
|
|
|
|||
|
|
@ -460,6 +460,8 @@ xf86parseMonitorSection (void)
|
|||
if (xf86getSubToken (&(ptr->mon_comment)) != NUMBER)
|
||||
Error (HORIZSYNC_MSG, NULL);
|
||||
do {
|
||||
if (ptr->mon_n_hsync >= CONF_MAX_HSYNC)
|
||||
Error ("Sorry. Too many horizontal sync intervals.", NULL);
|
||||
ptr->mon_hsync[ptr->mon_n_hsync].lo = val.realnum;
|
||||
switch (token = xf86getSubToken (&(ptr->mon_comment)))
|
||||
{
|
||||
|
|
@ -485,8 +487,6 @@ xf86parseMonitorSection (void)
|
|||
ptr->mon_n_hsync++;
|
||||
goto HorizDone;
|
||||
}
|
||||
if (ptr->mon_n_hsync >= CONF_MAX_HSYNC)
|
||||
Error ("Sorry. Too many horizontal sync intervals.", NULL);
|
||||
ptr->mon_n_hsync++;
|
||||
} while ((token = xf86getSubToken (&(ptr->mon_comment))) == NUMBER);
|
||||
HorizDone:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue