mirror of
https://github.com/CCExtractor/ccextractor.git
synced 2026-04-18 12:03:00 +00:00
[PR #950] [MERGED] [FIX] Fix segfault in add_cc_sub_text and initialize to NULL in init_encoder #1775
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/CCExtractor/ccextractor/pull/950
Author: @saurabhshah0410
Created: 3/3/2018
Status: ✅ Merged
Merged: 3/5/2018
Merged by: @cfsmp3
Base:
master← Head:bugfix📝 Commits (1)
8a7367aFix segfault in add_cc_sub_text and initialize to NULL in init_encoder📊 Changes
2 files changed (+3 additions, -0 deletions)
View changed files
📝
src/lib_ccx/ccx_common_common.c(+2 -0)📝
src/lib_ccx/ccx_encoders_common.c(+1 -0)📄 Description
Please prefix your pull request with one of the following: [FEATURE] [FIX] [IMPROVEMENT].
In raising this pull request, I confirm the following (please check boxes):
My familiarity with the project is as follows (check one):
This commit adds some checks to avoid segmentation faults.
In
add_cc_sub_text(), strdup will cause a segfault if we duplicate anempty string.
In
init_encoder(), initialize pointer fields to NULL to avoid randomaddressing so we can avoid illegal memory accessing and segfaults in
other places.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.