termux-packages/packages/id3ted/id3ted-1.0-fix-oob.patch

16 lines
511 B
Diff

https://github.com/muennich/id3ted/commit/a044c5659bf29df8152feabba63a83dc6feb7a99
diff --git a/fileio.cpp b/fileio.cpp
index 35d992f..edfe2de 100644
--- a/fileio.cpp
+++ b/fileio.cpp
@@ -154,7 +154,7 @@ FileIO::Status FileIO::resetTimes(const char *filename, const FileTimes &times)
}
FileIO::Status FileIO::createDir(const char *path) {
- char *directory = new char[strlen(path + 1)];
+ char *directory = new char[strlen(path) + 1];
char *curr = directory;
struct stat stats;
Status ret = Success;