From 511822529ae1710e141bc26199ec5ff1d1abcd16 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Wed, 28 Oct 2020 09:39:21 -0400 Subject: Revise fix for bug 32178 (spaces at end of log msg). The loop in the earlier patch would invoke undefined behavior in two ways: First, it would check whether it was looking at a space before it checked whether the pointer was in-range. Second, it would let a pointer reach a position _before_ the start of a string, which is not allowed. I've removed the assertion about empty messages: empty messages can be their own warning IMO. I've also added tests for this formatting code, to make sure it actually works. --- changes/ticket32178 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'changes/ticket32178') diff --git a/changes/ticket32178 b/changes/ticket32178 index ae8554d8a0..c13e490cb0 100644 --- a/changes/ticket32178 +++ b/changes/ticket32178 @@ -1,3 +1,3 @@ o Minor bugfixes (logging): - Remove trailing whitespaces from control event log messages. Fixes bug - 32178. + 32178; bugfix on 0.1.1.1-alpha. Based on a patch by Amadeusz Pawlik. -- cgit v1.2.3-54-g00ecf