Skip to content

Commit 63c4346

Browse files
lucianplsrouault
authored andcommitted
Merge pull request #12058 from lucianpls/MRF_deflate_expansion
MRF: allow deflate expansion When data is not compressible by DEFLATE, a slight increase happens, which is not an error. Output buffer overflow is not possible either, since DEFLATE is given the correct output buffer size available.
1 parent 1d5d389 commit 63c4346

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

frmts/mrf/mrf_band.cpp

-7
Original file line numberDiff line numberDiff line change
@@ -281,13 +281,6 @@ static void *DeflateBlock(buf_mgr &src, size_t extrasize, int flags)
281281
CPLFree(dbuff); // Safe to call with NULL
282282
return nullptr;
283283
}
284-
if (dst.size > src.size)
285-
{
286-
CPLError(CE_Failure, CPLE_AppDefined,
287-
"DeflateBlock(): dst.size > src.size");
288-
CPLFree(dbuff); // Safe to call with NULL
289-
return nullptr;
290-
}
291284

292285
// source size is used to hold the output size
293286
src.size = dst.size;

0 commit comments

Comments
 (0)