]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Use CHECK_PRINTF() for printf-like functions in util_bug.h
authorNick Mathewson <nickm@torproject.org>
Mon, 16 Dec 2019 20:14:13 +0000 (15:14 -0500)
committerNick Mathewson <nickm@torproject.org>
Mon, 16 Dec 2019 20:14:13 +0000 (15:14 -0500)
changes/ticket32765 [new file with mode: 0644]
src/lib/log/util_bug.h

diff --git a/changes/ticket32765 b/changes/ticket32765
new file mode 100644 (file)
index 0000000..a9663a5
--- /dev/null
@@ -0,0 +1,4 @@
+  o Minor bugfixes (correctness checks):
+    - Use GCC/Clang's printf-checking feature to make sure that
+      tor_assertf() arguments are correctly typed. Fixes bug 32765;
+      bugfix on 0.4.1.1-alpha.
index 546ae1e3ef127c32f5b866c9b4e6187a8c748faf..993a4e3abd8ba8ddb81aaf6820b491472fa3e49c 100644 (file)
 
 void tor_assertion_failed_(const char *fname, unsigned int line,
                            const char *func, const char *expr,
-                           const char *fmt, ...);
+                           const char *fmt, ...)
+    CHECK_PRINTF(5,6);
 void tor_bug_occurred_(const char *fname, unsigned int line,
                        const char *func, const char *expr,
-                       int once, const char *fmt, ...);
+                       int once, const char *fmt, ...)
+  CHECK_PRINTF(6,7);
 
 void tor_abort_(void) ATTR_NORETURN;