Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 84188 Details for
Bug 127723
fontforge-20050624 access violation (with lilypond-2.8.0)
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
fontforge-20060406-respect-HOME.patch
fontforge-20060406-respect-HOME.patch (text/plain), 2.33 KB, created by
SpanKY
on 2006-04-07 21:36:08 UTC
(
hide
)
Description:
fontforge-20060406-respect-HOME.patch
Filename:
MIME Type:
Creator:
SpanKY
Created:
2006-04-07 21:36:08 UTC
Size:
2.33 KB
patch
obsolete
>--- fontforge/diffstubs.c >+++ fontforge/diffstubs.c >@@ -1070,12 +1070,13 @@ return( dir = g_get_home_dir()); > # include <pwd.h> > > static char *gethomedir(void) { >- static char *dir=NULL; >+ static char *dir; > int uid; > struct passwd *pw; > >+ dir = getenv("HOME"); > if ( dir!=NULL ) >-return( dir ); >+return( strdup(dir) ); > > uid = getuid(); > while ( (pw=getpwent())!=NULL ) { >@@ -1087,21 +1088,17 @@ return( dir ); > } > endpwent(); > >- if ( (dir=getenv("HOME"))!=NULL ) >-return( (dir=strdup(dir)) ); >- > return( NULL ); > } > #endif > > char *getPfaEditDir(char *buffer) { >- static char *dir=NULL; >+ char *dir=gethomedir(); > >- if ( dir!=NULL ) >-return( dir ); >- if ( gethomedir()==NULL ) >+ if ( dir==NULL ) > return( NULL ); >- sprintf(buffer,"%s/.PfaEdit", gethomedir()); >+ sprintf(buffer,"%s/.PfaEdit", dir); >+ free(dir); > if ( access(buffer,F_OK)==-1 ) > if ( mkdir(buffer,0700)==-1 ) > return( NULL ); >--- fontforge/autosave.c >+++ fontforge/autosave.c >@@ -48,12 +48,13 @@ return( dir = g_get_home_dir()); > # include <pwd.h> > > static char *gethomedir(void) { >- static char *dir=NULL; >+ static char *dir; > int uid; > struct passwd *pw; > >+ dir = getenv("HOME"); > if ( dir!=NULL ) >-return( dir ); >+return( strdup(dir) ); > > uid = getuid(); > while ( (pw=getpwent())!=NULL ) { >@@ -65,21 +66,17 @@ return( dir ); > } > endpwent(); > >- if ( (dir=getenv("HOME"))!=NULL ) >-return( (dir=strdup(dir)) ); >- > return( NULL ); > } > #endif > > char *getPfaEditDir(char *buffer) { >- static char *dir=NULL; >+ char *dir=gethomedir(); > >- if ( dir!=NULL ) >-return( dir ); >- if ( gethomedir()==NULL ) >+ if ( dir==NULL ) > return( NULL ); >- sprintf(buffer,"%s/.PfaEdit", gethomedir()); >+ sprintf(buffer,"%s/.PfaEdit", dir); >+ free(dir); > if ( access(buffer,F_OK)==-1 ) > if ( mkdir(buffer,0700)==-1 ) > return( NULL ); >@@ -88,13 +85,12 @@ return( dir ); > } > > static char *getAutoDirName(char *buffer) { >- static char *dir=NULL; >+ char *dir=getPfaEditDir(buffer); > >- if ( dir!=NULL ) >-return( dir ); >- if ( getPfaEditDir(buffer)==NULL ) >+ if ( dir==NULL ) > return( NULL ); >- sprintf(buffer,"%s/autosave", getPfaEditDir(buffer)); >+ sprintf(buffer,"%s/autosave", dir); >+ free(dir); > if ( access(buffer,F_OK)==-1 ) > if ( mkdir(buffer,0700)==-1 ) > return( NULL );
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 127723
:
84186
| 84188