mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-12-05 12:13:50 +01:00
FramebufferManagerCommon: don't deref dstRect.vfb when no dst buffer was found
A failed FindTransferFramebuffer leaves dstRect zero-initialized, and RASTER_COLOR is 0, so the channel check passes and vfb is read through a null pointer. Only reachable for a depth-source transfer to an address with no matching framebuffer. Check dstBuffer first, like every other use of dstRect.vfb below.
This commit is contained in:
1 parent
a99ab6f6f6
commit
7604ae67ff
1 file changed
+1
-1
@@ -2609,7 +2609,7 @@ bool FramebufferManagerCommon::NotifyBlockTransferBefore(u32 dstBasePtr, int dst
|
||||
|
||||
if (srcRect.channel == RASTER_DEPTH) {
|
||||
// Ignore the found buffer if it's not 16-bit - we create a new more suitable one instead.
|
||||
if (dstRect.channel == RASTER_COLOR && dstRect.vfb->fb_format == GE_FORMAT_8888) {
|
||||
if (dstBuffer && dstRect.channel == RASTER_COLOR && dstRect.vfb->fb_format == GE_FORMAT_8888) {
|
||||
dstBuffer = false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user