Skip to content

Commit

Permalink
Fix rtc compressor buffer overrun
Browse files Browse the repository at this point in the history
Fix, say to me, how you are fixing this?

Thanks to Giperion
  • Loading branch information
Xottab-DUTY committed Oct 21, 2017
1 parent 2ddf908 commit ff2fd49
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/xrCore/Compression/rt_compressor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ u32 rtc_csize(u32 in)

u32 rtc_compress(void* dst, u32 dst_len, const void* src, u32 src_len)
{
u32 out_size = dst_len;
u64 out_size = dst_len;
int r = lzo1x_1_compress((const lzo_byte*)src, (lzo_uint)src_len, (lzo_byte*)dst, (lzo_uintp)&out_size, rtc_wrkmem);
VERIFY(r == LZO_E_OK);
return out_size;
}
u32 rtc_decompress(void* dst, u32 dst_len, const void* src, u32 src_len)
{
u32 out_size = dst_len;
u64 out_size = dst_len;
int r = lzo1x_decompress((const lzo_byte*)src, (lzo_uint)src_len, (lzo_byte*)dst, (lzo_uintp)&out_size, rtc_wrkmem);
VERIFY(r == LZO_E_OK);
return out_size;
Expand Down

0 comments on commit ff2fd49

Please sign in to comment.