-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Description
Hi,
Thanks for your useful compression code. I found there is a bug in here. The line:
for(temp_pointer_length = 0; && uncompressed_text[look_ahead++] == uncompressed_text[look_behind++]; ++temp_pointer_length)
Should be changed to:
for(temp_pointer_length = 0; look_ahead < uncompressed_size && uncompressed_text[look_ahead++] == uncompressed_text[look_behind++]; ++temp_pointer_length)
Basically, we should check the array boundary: "look_ahead < uncompressed_size"
Metadata
Metadata
Assignees
Labels
No labels