Skip to content

Commit ff2fd49

Browse files
committed
Fix rtc compressor buffer overrun
Fix, say to me, how you are fixing this? Thanks to Giperion
1 parent 2ddf908 commit ff2fd49

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/xrCore/Compression/rt_compressor.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ u32 rtc_csize(u32 in)
1616

1717
u32 rtc_compress(void* dst, u32 dst_len, const void* src, u32 src_len)
1818
{
19-
u32 out_size = dst_len;
19+
u64 out_size = dst_len;
2020
int r = lzo1x_1_compress((const lzo_byte*)src, (lzo_uint)src_len, (lzo_byte*)dst, (lzo_uintp)&out_size, rtc_wrkmem);
2121
VERIFY(r == LZO_E_OK);
2222
return out_size;
2323
}
2424
u32 rtc_decompress(void* dst, u32 dst_len, const void* src, u32 src_len)
2525
{
26-
u32 out_size = dst_len;
26+
u64 out_size = dst_len;
2727
int r = lzo1x_decompress((const lzo_byte*)src, (lzo_uint)src_len, (lzo_byte*)dst, (lzo_uintp)&out_size, rtc_wrkmem);
2828
VERIFY(r == LZO_E_OK);
2929
return out_size;

0 commit comments

Comments
 (0)