I'm very pleased to announce the release of our new website and documentation using the new toolchain with Hugo and AsciiDoctor. To get more information about the new toolchain please read the FreeBSD Documentation Project Primer[1], Hugo docs[2] and AsciiDoctor docs[3]. Acknowledgment: Benedict Reuschling <bcr@> Glen Barber <gjb@> Hiroki Sato <hrs@> Li-Wen Hsu <lwhsu@> Sean Chittenden <seanc@> The FreeBSD Foundation [1] https://docs.FreeBSD.org/en/books/fdp-primer/ [2] https://gohugo.io/documentation/ [3] https://docs.asciidoctor.org/home/ Approved by: doceng, core
23 lines
853 B
Diff
23 lines
853 B
Diff
Index: contrib/tcpdump/interface.h
|
|
diff -u contrib/tcpdump/interface.h:1.4.2.1 contrib/tcpdump/interface.h:1.4.2.1.6.1
|
|
--- contrib/tcpdump/interface.h:1.4.2.1 Thu Jul 26 15:30:00 2001
|
|
+++ contrib/tcpdump/interface.h Fri Jul 12 06:29:47 2002
|
|
@@ -132,8 +132,16 @@
|
|
extern const u_char *packetp;
|
|
extern const u_char *snapend;
|
|
|
|
-/* True if "l" bytes of "var" were captured */
|
|
-#define TTEST2(var, l) ((u_char *)&(var) <= snapend - (l))
|
|
+/*
|
|
+ * True if "l" bytes of "var" were captured.
|
|
+ *
|
|
+ * The "snapend - (l) <= snapend" checks to make sure "l" isn't so large
|
|
+ * that "snapend - (l)" underflows.
|
|
+ *
|
|
+ * The check is for <= rather than < because "l" might be 0.
|
|
+ */
|
|
+#define TTEST2(var, l) (snapend - (l) <= snapend && \
|
|
+ (const u_char *)&(var) <= snapend - (l))
|
|
|
|
/* True if "var" was captured */
|
|
#define TTEST(var) TTEST2(var, sizeof(var))
|