From 58ca04ac6156cb5c1764b037281856e5f78c0812 Mon Sep 17 00:00:00 2001 From: Fred Gleason Date: Mon, 23 Jul 2018 16:27:20 +0000 Subject: [PATCH] 2018-07-23 Fred Gleason * Cleaned up CDDA calls to ensure UTF-8 compatibility. --- ChangeLog | 2 ++ lib/rdcddblookup.cpp | 12 +++++------- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 526a36f8..f9b30d11 100644 --- a/ChangeLog +++ b/ChangeLog @@ -17208,3 +17208,5 @@ table. 2018-07-23 Fred Gleason * Fixed a buffer overflow vulnerability in the 'RDCddbLookup' class. +2018-07-23 Fred Gleason + * Cleaned up CDDA calls to ensure UTF-8 compatibility. diff --git a/lib/rdcddblookup.cpp b/lib/rdcddblookup.cpp index 2b74fad5..f0a3183e 100644 --- a/lib/rdcddblookup.cpp +++ b/lib/rdcddblookup.cpp @@ -362,8 +362,7 @@ bool RDCddbLookup::ReadCdText(const QString &cdda_dir,const QString &cdda_dev) // Read the Track Title Data File // for(int i=0;itracks();i++) { - title_profile->setSource(QString().sprintf("%s/audio_%02d.inf", - (const char *)cdda_dir,i+1)); + title_profile->setSource(cdda_dir+QString().sprintf("/audio_%02d.inf",i+1)); str=title_profile->stringValue("","Albumtitle",""); str.remove("'"); if((!str.isEmpty())&&(str!="''")) { @@ -408,9 +407,9 @@ bool RDCddbLookup::ReadIsrcs(const QString &cdda_dir,const QString &cdda_dev) // // Write the ISRC Data to a Temp File // - cmd=QString().sprintf("CURDIR=`pwd`;cd %s;cdda2wav -D %s --info-only -v trackid 2> /dev/null;cd $CURDIR", - (const char *)cdda_dir, - (const char *)cdda_dev); + cmd=QString("CURDIR=`pwd`;cd ")+ + cdda_dir+";cdda2wav -D "+cdda_dev+ + " --info-only -v trackid 2> /dev/null;cd $CURDIR"; if((err=system(cmd))!=0) { return false; } @@ -419,8 +418,7 @@ bool RDCddbLookup::ReadIsrcs(const QString &cdda_dir,const QString &cdda_dev) // Read the ISRC Data File // for(int i=0;itracks();i++) { - isrc_profile->setSource(QString().sprintf("%s/audio_%02d.inf", - (const char *)cdda_dir,i+1)); + isrc_profile->setSource(cdda_dir+QString().sprintf("/audio_%02d.inf",i+1)); str=isrc_profile->stringValue("","ISRC",""); str.remove("'"); str.remove("-");