summaryrefslogtreecommitdiff
path: root/test/Makefile.am
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2011-11-23 00:30:02 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2011-12-02 00:17:28 -0800
commitfeebf6746374aa04b12e9e3e51313a3a82c03530 (patch)
tree8da255bd06f88cca4d0d1e160dbb4355a046c553 /test/Makefile.am
parentfb22a408c69a84f81905147de9e82cf66ffb6eb2 (diff)
Limit the number of screens Xvfb will attempt to allocate memory for
Commit f9e3a2955d2ca7 removing the MAXSCREEN limit left the screen number too unlimited, and allowed any positive int for a screen number: Xvfb :1 -screen 2147483647 1024x1024x8 Fatal server error: Not enough memory for screen 2147483647 Found by Parfait 0.3.7: Error: Integer overflow (CWE 190) Integer parameter of memory allocation function realloc() may overflow due to multiplication with constant value 1112 at line 293 of hw/vfb/InitOutput.c in function 'ddxProcessArgument'. Since the X11 connection setup only has a CARD8 for number of SCREENS, limit to 255 screens, which is also low enough to avoid overflow on the sizeof(*vfbScreens) * (screenNum + 1) calculation for realloc. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jamey Sharp <jamey@minilop.net>
Diffstat (limited to 'test/Makefile.am')
0 files changed, 0 insertions, 0 deletions