[BUG] gw/wap_push_ppg.c/read_ppg_config()

"Paul Keogh" <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Message-ID <[email protected]>
     if (cfg == NULL)
         return USER_CONFIGURATION_NOT_ADDED;

     grp = cfg_get_single_group(cfg, octstr_imm("ppg"));
     if ((ppg_url = cfg_get(grp, octstr_imm("ppg-url"))) == NULL)

The code snippet above crashes if grp is NULL.

I suggest that the

     if (cfg == NULL)

is replaced with

     if (cfg == NULL || cfg_get_single_group(cfg, octstr_imm("ppg")) ==
NULL) {

(evaluation is left to right I think :-))

Paul Keogh
ANAM Wireless Internet Solutions
http://www.anam.com
+353 1 284 7555 (wired)               +353 86 234 6047 (wireless)
Castle Yard, Saint Patrick's Road, Dalkey, County Dublin, Ireland
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.