]> mj.ucw.cz Git - libucw.git/commitdiff
empty section of configuration item forbidden
authorRobert Spalek <robert@ucw.cz>
Mon, 14 Jan 2002 19:38:41 +0000 (19:38 +0000)
committerRobert Spalek <robert@ucw.cz>
Mon, 14 Jan 2002 19:38:41 +0000 (19:38 +0000)
lib/conf.c

index 3f79fc22d3497d4c15c9de0dc524ac7f762ebf20..98c34b56b16d62eadaf222c04c618bf69c6a2a9d 100644 (file)
@@ -85,6 +85,8 @@ byte *cf_set_item(byte *sect, byte *name, byte *value)
        struct cfitem *item;
        byte *msg=NULL;
 
+       if (!*sect)
+               return "Empty section name";
        item=cf_get_item(sect,name);
        if(!item)       /* ignore unknown section */
                return NULL;