about summary refs log tree commit diff
diff options
context:
space:
mode:
authorvanhauser-thc <vh@thc.org>2021-06-01 11:00:56 +0200
committervanhauser-thc <vh@thc.org>2021-06-01 11:00:56 +0200
commit8017f88614d057cee5cf11fd48244d012be77c5e (patch)
treecd3bd283f0c2e4ca41f3fd18ffb20c155b3a8b0a
parent5f6ff95e6a203ef6392f7c100a981671edc5fe41 (diff)
downloadafl++-8017f88614d057cee5cf11fd48244d012be77c5e.tar.gz
debug ck_write
-rw-r--r--include/debug.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/debug.h b/include/debug.h
index fc1f39cb..f8df5711 100644
--- a/include/debug.h
+++ b/include/debug.h
@@ -362,7 +362,12 @@ static inline const char *colorfilter(const char *x) {
                                                                           \
     s32 _len = (s32)(len);                                                \
     s32 _res = write(_fd, (buf), _len);                                   \
-    if (_res != _len) RPFATAL(_res, "Short write to %s, fd %d", fn, _fd); \
+    if (_res != _len) {                                                   \
+                                                                          \
+      RPFATAL(_res, "Short write to %s, fd %d (%d of %d bytes)", fn, _fd, \
+              _res, _len);                                                \
+                                                                          \
+    }                                                                     \
                                                                           \
   } while (0)