Skip to content

Commit

Permalink
pmt.cpp: Fix crash in compareAudioSubtitleCode
Browse files Browse the repository at this point in the history
strcasecmp expects char* instead of std::string
Crash reported here: https://forums.openpli.org/topic/83699-crash/
  • Loading branch information
betacentauri committed May 22, 2021
1 parent b0772c2 commit a811659
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/dvb/pmt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -778,7 +778,7 @@ int eDVBServicePMTHandler::compareAudioSubtitleCode(const std::string &subtitleT
{
for (const auto& _audioTrack : split(audioTrack, "/"))
{
if (strcasecmp(subtitleTrack, _audioTrack) == 0)
if (strcasecmp(subtitleTrack.c_str(), _audioTrack.c_str()) == 0)
return 0;
}
return -1;
Expand Down

0 comments on commit a811659

Please sign in to comment.