plug-ins: Fix ZDI-CAN-25100 for FLI plug-in

Resolves #13073
This patch adds a check to make sure we're not
writing beyond the bounds of the "pos" array.
This is the same check that we do earlier when
writing pos[xc++], but it was left off of the last
write command. Since "n" will be 0 if we get to the
end of the array, it prevents us from writing beyond
that.
This commit is contained in:
Alx Sa 2025-03-10 04:07:44 +00:00
parent 121a997af5
commit 0806bc76ca
1 changed files with 1 additions and 1 deletions

View File

@ -1529,7 +1529,7 @@ fli_read_lc_2 (FILE *f,
xc += len << 1;
}
}
if (lpf)
if (lpf && xc < n)
pos[xc] = lpn;
yc++;
}