mirror of
https://github.com/TheAlgorithms/C.git
synced 2026-02-04 05:44:35 +00:00
[PR #1329] fix: heap-buffer-overflow in run_length_encoding.c
#1931
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/TheAlgorithms/C/pull/1329
Author: @vil02
Created: 10/2/2023
Status: 🔄 Open
Base:
master← Head:heap-buffer-overflow_in_run_length_encoding_patch📝 Commits (1)
9406e55fix:heap-buffer-overflow📊 Changes
1 file changed (+20 additions, -4 deletions)
View changed files
📝
misc/run_length_encoding.c(+20 -4)📄 Description
Description of Change
Running
run_length_encoding.cleads toheap-buffer-overflow. Theencodedis one too short. Moreover, there is an error in this test case:e5dad3fa8d/misc/run_length_encoding.c (L77)Note that the last character of the output of the function
run_length_encodehas to be the same as the last character of the input.This PR fixes the mentioned issues and adds new test cases.
References
Checklist
Notes:
This PR fixes the
heap-buffer-overflowinrun_length_encoding.c.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.