diff options
author | Alexis La Goutte <alexis.lagoutte@gmail.com> | 2012-01-10 13:59:27 +0000 |
---|---|---|
committer | Alexis La Goutte <alexis.lagoutte@gmail.com> | 2012-01-10 13:59:27 +0000 |
commit | 8b66d8fae74b9e2de694e5f1ee616d90a7a504c6 (patch) | |
tree | a3df7f32cd493310a7f670447e9a5a88cb2e907b /pcapio.c | |
parent | 668e23f9feddd058f3dff4be9cc6964c621e1c65 (diff) | |
download | wireshark-8b66d8fae74b9e2de694e5f1ee616d90a7a504c6.tar.gz wireshark-8b66d8fae74b9e2de694e5f1ee616d90a7a504c6.tar.bz2 wireshark-8b66d8fae74b9e2de694e5f1ee616d90a7a504c6.zip |
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.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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 */ |