diff --git a/src/pdfalto.cc b/src/pdfalto.cc index 0a22164..783b1d6 100644 --- a/src/pdfalto.cc +++ b/src/pdfalto.cc @@ -187,7 +187,7 @@ int main(int argc, char *argv[]) { char *dirname; dirname = (char*)malloc(dirname_length + 1); - strncat(dirname, thePath, dirname_length); + strncpy(dirname, thePath, dirname_length); dirname[dirname_length] = '\0'; // set the config file path as alongside the executable @@ -473,4 +473,4 @@ void removeAlreadyExistingData(GString *dir) { if (file) delete file; closedir(rep); } -} \ No newline at end of file +}