Added check to avoid out of bounds access

This commit is contained in:
johenning
2017-08-26 16:02:36 +02:00
committed by GitHub
parent 9579203a99
commit 9e6888070d

View File

@@ -746,7 +746,7 @@ Glib::ustring BatchQueue::calcAutoFileNameBase (const Glib::ustring& origFileNam
if (origFileName[0] == '/') {
pa.push_back ("/" + da[0]);
} else if (origFileName[0] == '\\') {
if (origFileName[1] == '\\') {
if (origFileName.size() > 1 && origFileName[1] == '\\') {
pa.push_back ("\\\\" + da[0]);
}
else {