forked from osmocom/wireshark
Fix Coverty 1392 ('name' might be NULL): don't write out the interface name when we're trying to write out the interface description.
svn path=/trunk/; revision=41779
This commit is contained in:
parent
b800903ca2
commit
2256fabd86
2
pcapio.c
2
pcapio.c
|
@ -486,7 +486,7 @@ libpcap_write_interface_description_block(FILE *fp,
|
|||
option.type = IDB_DESCRIPTION;
|
||||
option.value_length = (guint16)strlen(descr);
|
||||
WRITE_DATA(fp, &option, sizeof(struct option), *bytes_written, err);
|
||||
WRITE_DATA(fp, name, strlen(descr), *bytes_written, err);
|
||||
WRITE_DATA(fp, descr, strlen(descr), *bytes_written, err);
|
||||
if (strlen(descr) % 4) {
|
||||
WRITE_DATA(fp, &padding, 4 - strlen(descr) % 4 , *bytes_written, err);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue