Skip to content

Commit ae9705a

Browse files
committed
Fixed pointer overwrite when using full sized framebuffer
1 parent dc84ef1 commit ae9705a

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=JPEGDEC
2-
version=1.8.3
2+
version=1.8.4
33
author=Larry Bank
44
maintainer=Larry Bank
55
sentence=Optimized JPEG decoder for MCUs with 32K+ RAM.

src/jpeg.inl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5124,7 +5124,9 @@ static int DecodeJPEG(JPEGIMAGE *pJPEG)
51245124
}
51255125
for (x = 0; x < cx && bContinue && iErr == 0; x++)
51265126
{
5127-
pJPEG->usPixels = &pAlignedPixels[iDMAOffset]; // make sure output is correct offset for DMA
5127+
if (pJPEG->pFramebuffer == NULL) {
5128+
pJPEG->usPixels = &pAlignedPixels[iDMAOffset]; // make sure output is correct offset for DMA
5129+
}
51285130

51295131
iSkipMask = 0; // assume not skipping
51305132
if (bSkipRow || x*mcuCX < pJPEG->iCropX || x*mcuCX > pJPEG->iCropX+pJPEG->iCropCX) {

0 commit comments

Comments
 (0)