summaryrefslogtreecommitdiff
path: root/wiretap/erf.c
diff options
context:
space:
mode:
Diffstat (limited to 'wiretap/erf.c')
-rw-r--r--wiretap/erf.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/wiretap/erf.c b/wiretap/erf.c
index 5ca207ae47..b31562b0f5 100644
--- a/wiretap/erf.c
+++ b/wiretap/erf.c
@@ -1259,11 +1259,12 @@ static int populate_capture_host_info(erf_t *erf_priv, wtap *wth, union wtap_pse
gchar* modelcpu = NULL;
guint32 tagtotallength;
- if (!wth || !state || !wth->shb_hdr)
+ if (!wth || !state || !wth->shb_hdrs || (wth->shb_hdrs->len == 0))
return -1;
/* XXX: wth->shb_hdr is already created by different layer, using directly for now. */
- shb_hdr = wth->shb_hdr;
+ /* XXX: Only one section header is supported at this time */
+ shb_hdr = g_array_index(wth->shb_hdrs, wtap_optionblock_t, 0);
while ((tagtotallength = erf_meta_read_tag(&tag, state->tag_ptr, state->remaining_len)) && !ERF_META_IS_SECTION(tag.type)) {
switch (state->sectiontype) {