From: notaz Date: Fri, 1 Nov 2024 00:00:34 +0000 (+0200) Subject: cdriso: missing null check X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bbbeaa14c34e11750b267b01198238d05705bd7e;p=pcsx_rearmed.git cdriso: missing null check --- diff --git a/libpcsxcore/cdriso.c b/libpcsxcore/cdriso.c index 9b98fbe5..9282430f 100644 --- a/libpcsxcore/cdriso.c +++ b/libpcsxcore/cdriso.c @@ -1647,7 +1647,7 @@ int ISOreadTrack(const unsigned char *time, void *buf) ret = cdimg_read_func(cdHandle, 0, buf, sector); if (ret < 12*2 + 2048) { - if (multifile && sector >= msf2sec(ti[1].length)) { + if (buf && multifile && sector >= msf2sec(ti[1].length)) { // assume a gap not backed by a file memset(buf, 0, CD_FRAMESIZE_RAW); return 0;