Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 38612 Details for
Bug 62427
[PATCH] ttmkfdir-3.0.9 segfaults with invalid argument to '-d'
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
ttmkfdir-3.0.9 patch
ttmkfdir.patch (text/plain), 2.14 KB, created by
Benjamin Schindler (RETIRED)
on 2004-08-31 13:54:34 UTC
(
hide
)
Description:
ttmkfdir-3.0.9 patch
Filename:
MIME Type:
Creator:
Benjamin Schindler (RETIRED)
Created:
2004-08-31 13:54:34 UTC
Size:
2.14 KB
patch
obsolete
>diff -burN ttmkfdir-3.0.9/directory.cpp /home/benjamin/tmp/directory.cpp >--- ttmkfdir-3.0.9/directory.cpp 2002-12-09 09:29:11.000000000 +0100 >+++ /home/benjamin/tmp/directory.cpp 2004-08-31 22:32:08.193250592 +0200 >@@ -9,10 +9,12 @@ > { > } > >-void >+int > directory::scan (const std::string &dir) > { > DIR *ttfdir = opendir(dir.c_str ()); >+ if(!ttfdir) >+ return -1; > > this->clear (); > dirpath = dir; >@@ -26,6 +28,7 @@ > } > > closedir (ttfdir); >+ return 0; > } > > bool >diff -burN ttmkfdir-3.0.9/directory.h /home/benjamin/tmp/directory.h >--- ttmkfdir-3.0.9/directory.h 2002-12-09 09:29:11.000000000 +0100 >+++ /home/benjamin/tmp/directory.h 2004-08-31 22:32:08.193250592 +0200 >@@ -11,7 +11,7 @@ > if (path != "") scan (path); > }; > virtual ~directory (void); >- void scan (const std::string &path = "."); >+ int scan (const std::string &path = "."); > virtual bool select (const char *name) const; > const std::string &path (void) const { > return dirpath; >diff -burN ttmkfdir-3.0.9/encoding.l /home/benjamin/tmp/encoding.l >--- ttmkfdir-3.0.9/encoding.l 2003-01-08 06:25:25.000000000 +0100 >+++ /home/benjamin/tmp/encoding.l 2004-08-31 22:32:08.195250288 +0200 >@@ -98,10 +98,10 @@ > char *startptr = strip_first (yytext); > char *endptr; > >- int i1 = std::strtol (startptr, &endptr, 0); >+ int i1 = std::strtol (startptr, &endptr, 10); > startptr = endptr; > >- int i2 = std::strtol (startptr, &endptr, 0); >+ int i2 = std::strtol (startptr, &endptr, 10); > > if (startptr == endptr) { > i2 = i1; >diff -burN ttmkfdir-3.0.9/ttmkfdir.cpp /home/benjamin/tmp/ttmkfdir.cpp >--- ttmkfdir-3.0.9/ttmkfdir.cpp 2003-01-20 00:33:11.000000000 +0100 >+++ /home/benjamin/tmp/ttmkfdir.cpp 2004-08-31 22:32:08.214247400 +0200 >@@ -60,7 +60,10 @@ > return 0; > } > >- dir::instance()->scan (cmdline::instance()->option ("font-dir")); >+ if(dir::instance()->scan (cmdline::instance()->option ("font-dir")) == -1) { >+ printf("No such directory...\n"); >+ return -1; >+ } > > for (directory::iterator i = dir::instance()->begin (); i != dir::instance()->end(); i++) { > const ttf::Face face (dir::instance()->path() + '/' + *i);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 62427
: 38612