ucimap: ucimap_parse: consider smap_offset when allocating the section data
[project/uci.git] / ucimap.c
index 9853e7e89fb337207cd122d486da68ce1c912722..7c4fb0240790aeb6c2386aa8c7deed8824bfda6d 100644 (file)
--- a/ucimap.c
+++ b/ucimap.c
@@ -884,6 +884,7 @@ ucimap_parse(struct uci_map *map, struct uci_package *pkg)
                        } else {
                                sd = malloc(sm->alloc_len);
                                memset(sd, 0, sm->alloc_len);
+                               sd = ucimap_ptr_section(sm, sd);
                        }
                        if (!sd)
                                continue;