Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#359 VGA draw reads 4 bytes out of a 3 byte array

SVN
closed
h-a-l-9000
graphics (66)
5
2012-11-28
2011-01-12
James Bryant
No

I'm not sure what effect his has, but I noticed it and thought I should report it.

The following line of code reads 4 bytes out of forestack and forestack is only 3 bytes in size. backstack is also affected.

(Bit32u)vga.s3.hgc.forestack

hardware/vga_draw.cpp

348 xat = (Bit32u)vga.s3.hgc.forestack;
349 } else {
350
xat = (Bit32u)vga.s3.hgc.backstack;

include/vga.h

172 typedef struct {
173 Bit8u curmode;
174 Bit16u originx, originy;
175 Bit8u fstackpos, bstackpos;
176 Bit8u forestack[3];
177 Bit8u backstack[3];
178 Bit16u startaddr;
179 Bit8u posx, posy;
180 Bit8u mc[64][64];
181 } VGA_HWCURSOR;

Discussion

  • Peter Veenstra
    Peter Veenstra
    2012-08-13

    The bug has been fixed.
    Wait for the upcoming new version to see it.

    Or:

    The updated source is available by cvs.

    See the link on top of the screen for information on how to get
    the new sources.

    The DOSBox Team