The rtime decompression routine does not fully check bounds during the
entirety of the decompression pass and can corrupt memory outside the
decompression buffer if the compressed data is corrupted. This adds the
required check to prevent this failure mode.
Cc: [email protected]
Signed-off-by: Kinsey Moore <[email protected]>
Signed-off-by: Richard Weinberger <[email protected]>
positions[value]=outpos;
if (repeat) {
+ if ((outpos + repeat) >= destlen) {
+ return 1;
+ }
if (backoffs + repeat >= outpos) {
while(repeat) {
cpage_out[outpos++] = cpage_out[backoffs++];