summaryrefslogtreecommitdiff
path: root/wiretap
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2013-06-09 06:44:47 +0000
committerGuy Harris <guy@alum.mit.edu>2013-06-09 06:44:47 +0000
commitf4f4e024bcbfef8f21c721fd7262772f5401b103 (patch)
tree0c432875bef3993c9cdd5c6af698a7e24d54ec9f /wiretap
parent2d37ec3cb0279abe706199317297c2b17e6e1893 (diff)
downloadwireshark-f4f4e024bcbfef8f21c721fd7262772f5401b103.tar.gz
libwireshark's add_new_ipv4() and add_new_ipv6() now silently ignore
requests to add an entry with a zero-length name; we don't have to ignore them ourselves. svn path=/trunk/; revision=49854
Diffstat (limited to 'wiretap')
-rw-r--r--wiretap/pcapng.c19
1 files changed, 3 insertions, 16 deletions
diff --git a/wiretap/pcapng.c b/wiretap/pcapng.c
index 263c17e901..f8aa4d379b 100644
--- a/wiretap/pcapng.c
+++ b/wiretap/pcapng.c
@@ -1643,13 +1643,7 @@ pcapng_read_name_resolution_block(FILE_T fh, pcapng_block_header_t *bh, pcapng_t
buffer_free(&nrb_rec);
return -1; /* fail */
}
-
- /*
- * Silently ignore zero-length
- * names.
- */
- if (namelen != 1)
- pn->add_new_ipv4(v4_addr, namep);
+ pn->add_new_ipv4(v4_addr, namep);
}
}
@@ -1713,15 +1707,8 @@ pcapng_read_name_resolution_block(FILE_T fh, pcapng_block_header_t *bh, pcapng_t
buffer_free(&nrb_rec);
return -1; /* fail */
}
-
- /*
- * Silently ignore zero-length
- * names.
- */
- if (namelen != 1) {
- pn->add_new_ipv6(buffer_start_ptr(&nrb_rec),
- namep);
- }
+ pn->add_new_ipv6(buffer_start_ptr(&nrb_rec),
+ namep);
}
}