Dne 8.8.2011 9:38, Michal Hocko napsal(a):
On Mon, Aug 08, 2011 at 12:54:05AM +0200, Jozef Misutka wrote:
struct pdfedit_core_dev_init should be "smarter" and initialize its 
members to default values
Default is - no special values. We inheritted this from xpdf code which
initializes all values from configuration file (which may not exist) or
command line parameters.


struct pdfedit_core_dev_init init;
init.fontDir = ".";

is really tempting but very wrong indeed.
Why do you consider it wrong? pdfedit_core_dev_init calls init_xpdf_core
which in turn uses init->fontDir for global parameters initialization.

because not all members of init are initialised properly (cfgFileName) - though a crash on some platforms is inevitable.