--- libaitcfg/src/parse.c 2012/04/04 13:11:49 1.7 +++ libaitcfg/src/parse.c 2012/07/22 21:54:47 1.8 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: parse.c,v 1.7 2012/04/04 13:11:49 misho Exp $ +* $Id: parse.c,v 1.8 2012/07/22 21:54:47 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -121,7 +121,7 @@ int cfgReadConfig(FILE *f, cfg_root_t * __restrict cfg } /* *NEW PAIR* alloc new pair element */ - av = malloc(sizeof(struct tagCfg)); + av = io_malloc(sizeof(struct tagCfg)); if (!av) { LOGERR; return -1; @@ -133,7 +133,7 @@ int cfgReadConfig(FILE *f, cfg_root_t * __restrict cfg } /* check for continues line */ - psAttr = line + strlen(line) - 1; + psAttr = line + (*line ? strlen(line) : 1) - 1; if (*psAttr == '\\') { *psAttr = 0; flg = 1;