--- Oliver Stieber oliver_stieber@yahoo.co.uk wrote:
The if (coordIdx > 15) warning is incorrect as generated coordinates can have coordIdx > s that are much higher, this can be verified by running the fr-025-final2 demo (http://www.scene.org/file.php?file=/demos/groups/farb-rausch/fr-025-final2.z...)
The attached patch has the (coordIdx > 15) removed.
Oliver.
Hi.
This patch verify that the texture coordinate used in DrawStridedSlow is in range before trying to referencing the associated data.
Oliver.
___________________________________________________________ How much free photo storage do you get? Store your holiday snaps for FREE with Yahoo! Photos http://uk.photos.yahoo.com%3E Files
clean/wine/dlls/wined3d/.device.c.swp and smallpatches/wine/dlls/wined3d/.device.c.swp
differ diff -X ignore -Nru clean/wine/dlls/wined3d/drawprim.c smallpatches/wine/dlls/wined3d/drawprim.c --- clean/wine/dlls/wined3d/drawprim.c 2005-10-12 14:14:29.524975000 +0100 +++ smallpatches/wine/dlls/wined3d/drawprim.c 2005-11-06 23:51:35.664707408 +0000 @@ -1317,13 +1317,22 @@ if (This->stateBlock->textures[textureNo] != NULL) {
int coordIdx =
This->stateBlock->textureState[textureNo][D3DTSS_TEXCOORDINDEX];
float *ptrToCoords = (float *)(sd->u.s.texCoords[coordIdx].lpData +
(SkipnStrides * sd->u.s.texCoords[coordIdx].dwStride));
float *ptrToCoords = NULL; float s = 0.0, t = 0.0, r = 0.0, q = 0.0; if (coordIdx > 7) { VTRACE(("tex: %d - Skip tex coords, as being system generated\n",
textureNo));
if (coordIdx > 15) {
FIXME("tex: %d - Unexpectdly high texture coord index %d, expect a
crash.\n", textureNo, coordIdx);
}
continue;
} else if (coordIdx < 0) {
FIXME("tex: %d - Coord index %d is less than zero, expect a crash.\n",
textureNo, coordIdx); continue;
} else if (sd->u.s.texCoords[coordIdx].lpData == NULL) {
}
ptrToCoords = (float *)(sd->u.s.texCoords[coordIdx].lpData + (SkipnStrides *
sd->u.s.texCoords[coordIdx].dwStride));
if (sd->u.s.texCoords[coordIdx].lpData == NULL) { TRACE("tex: %d - Skipping tex coords, as no data supplied\n", textureNo); continue; } else {
___________________________________________________________ To help you stay safe and secure online, we've developed the all new Yahoo! Security Centre. http://uk.security.yahoo.com