Re: [PATCH v3 1/2] config: verify that the config file is not null

2013-09-26 Thread Damian, Alexandru
Disregard this patch, I sent in another that should handle better the config file issues. Alex On Wed, Sep 25, 2013 at 11:23 PM, Damian, Alexandru alexandru.dam...@intel.com wrote: The nice thing was that even if some other code besides the _log tries to read the file path, that code can

[PATCH v3 1/2] config: verify that the config file is not null

2013-09-25 Thread Alex DAMIAN
From: Alexandru DAMIAN alexandru.dam...@intel.com weston_config_parse may return NULL, leading to an ungraceful exit via SIGSEGV if we try to reference the structure. Adding a check in weston_config_full_path so that we return the empty file /dev/null as filename if we started without a config

Re: [PATCH v3 1/2] config: verify that the config file is not null

2013-09-25 Thread Bill Spitzak
Do you think anything is really going to try to open and read the file, and then crash because it does not exist? If this is a concern then you also have to worry about the config file being deleted after Wayland starts up. I think returning or some other non-existent file (perhaps the

Re: [PATCH v3 1/2] config: verify that the config file is not null

2013-09-25 Thread Kristian Høgsberg
On Wed, Sep 25, 2013 at 11:07 AM, Alex DAMIAN alexandru.dam...@intel.com wrote: From: Alexandru DAMIAN alexandru.dam...@intel.com weston_config_parse may return NULL, leading to an ungraceful exit via SIGSEGV if we try to reference the structure. Adding a check in weston_config_full_path so

Re: [PATCH v3 1/2] config: verify that the config file is not null

2013-09-25 Thread Damian, Alexandru
The nice thing was that even if some other code besides the _log tries to read the file path, that code can expect to open the path and read from it just fine, instead of receiving a NULL and maybe crashing. I'm gonna check tomorrow if this happens somewhere else in the code, and if not, modify