From c98e2801deb9f14681aee7280556db43fc2b48e1 Mon Sep 17 00:00:00 2001 From: Travis Goodspeed Date: Sun, 3 Dec 2023 11:20:13 -0500 Subject: [PATCH] Strictly limits TLCS47 size to prevent illegal accesses in solving. #72 --- gatodecodertlcsfont.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gatodecodertlcsfont.cpp b/gatodecodertlcsfont.cpp index 444c600..a7a019c 100644 --- a/gatodecodertlcsfont.cpp +++ b/gatodecodertlcsfont.cpp @@ -37,8 +37,9 @@ QByteArray GatoDecoderTLCSFont::decode(GatoROM *gr){ if(gr->outputcols%8!=0) return ba; if(gr->outputrows%8!=0) return ba; - //qDebug()<<"Output size is"<outputrows<<"x"<outputcols; - //qDebug()<<"Angle is"<angle; + //Strictly check the size. FIXME: Make this more generic. + if(gr->outputrows!=48 || gr->outputcols!=64) + return ba; //Top to bottom uint32_t adr=0;