aboutsummaryrefslogtreecommitdiffstats
path: root/pcapio.c
diff options
context:
space:
mode:
authorAlexis La Goutte <alexis.lagoutte@gmail.com>2012-01-10 13:59:27 +0000
committerAlexis La Goutte <alexis.lagoutte@gmail.com>2012-01-10 13:59:27 +0000
commit8b66d8fae74b9e2de694e5f1ee616d90a7a504c6 (patch)
treea3df7f32cd493310a7f670447e9a5a88cb2e907b /pcapio.c
parent668e23f9feddd058f3dff4be9cc6964c621e1c65 (diff)
From Jose Pedro Oliveira via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6719
pcapio.c: bug in libpcap_write_interface_description_block The attached patch fixes a copy_and_paste error in the code of the function libpcap_write_interface_description_block(): strlen(name) instead of strlen(filter). svn path=/trunk/; revision=40423
Diffstat (limited to 'pcapio.c')
-rw-r--r--pcapio.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/pcapio.c b/pcapio.c
index 575b9f76a6..6029532d72 100644
--- a/pcapio.c
+++ b/pcapio.c
@@ -330,12 +330,12 @@ libpcap_write_interface_description_block(FILE *fp,
block_total_length += sizeof(struct option) +
(guint16)(ADD_PADDING(strlen(name) + 1));
}
- if ((strlen(filter) > 0) && (strlen(name) < G_MAXUINT16)) {
+ if ((strlen(filter) > 0) && (strlen(filter) < G_MAXUINT16)) {
block_total_length += sizeof(struct option) +
(guint16)(ADD_PADDING(strlen(filter) + 1));
}
if (((strlen(name) > 0) && (strlen(name) < G_MAXUINT16)) ||
- ((strlen(filter) > 0) && (strlen(name) < G_MAXUINT16))) {
+ ((strlen(filter) > 0) && (strlen(filter) < G_MAXUINT16))) {
block_total_length += sizeof(struct option);
}
/* write block header */