mirror of
https://github.com/CCExtractor/ccextractor.git
synced 2026-02-03 21:23:48 +00:00
[PR #963] [MERGED] [FIX] Fix possible segfaults in hardsubx_classifier.c due to strdup #1783
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/963
Author: @saurabhshah0410
Created: 3/12/2018
Status: ✅ Merged
Merged: 3/16/2018
Merged by: @cfsmp3
Base:
master← Head:928📝 Commits (1)
9c2dcc7Fix possible segfaults in hardsubx_classifier.c due to strdup📊 Changes
1 file changed (+20 additions, -8 deletions)
View changed files
📝
src/lib_ccx/hardsubx_classifier.c(+20 -8)📄 Description
In raising this pull request, I confirm the following (please check boxes):
My familiarity with the project is as follows (check one):
strdupwill give a segmentation fault if the argument passed to it isNULL.TessResultIteratorGetUTF8Textreturns achar*which can beNULLand we should not call
strdupdirectly over it. Once we check if thevalue returned is not
NULL, then we can callstrdup.This also fixes #928.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.