ttmkfdir/ttmkfdir-3.0.9-segfaults.patch

14 lines
391 B
Diff
Raw Normal View History

--- ttmkfdir-3.0.9/directory.cpp.back 2005-10-08 14:25:37.839328408 +0800
+++ ttmkfdir-3.0.9/directory.cpp 2005-10-08 14:26:00.021956136 +0800
@@ -13,6 +13,10 @@
directory::scan (const std::string &dir)
{
DIR *ttfdir = opendir(dir.c_str ());
+ if (!ttfdir) {
+ printf("%s is not exist!\n", dir.c_str ());
+ exit(-1);
+ }
this->clear ();
dirpath = dir;