libpcap/0066-Check-for-an-empty-description-by-checking-if-the-fi.patch
2019-09-30 10:57:32 -04:00

27 lines
683 B
Diff

From 593769c3637583653bafa924fe348115016618c3 Mon Sep 17 00:00:00 2001
From: Guy Harris <guy@alum.mit.edu>
Date: Fri, 31 May 2019 10:35:25 -0700
Subject: [PATCH 66/83] Check for an empty description by checking if the first
character is NUL.
---
pcap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pcap.c b/pcap.c
index d9917a2..0d98519 100644
--- a/pcap.c
+++ b/pcap.c
@@ -802,7 +802,7 @@ get_if_description(const char *name)
}
#endif /* __FreeBSD__ */
close(s);
- if (description != NULL && strlen(description) == 0) {
+ if (description != NULL && description[0] == '\0') {
/*
* Description is empty, so discard it.
*/
--
1.8.3.1