summaryrefslogtreecommitdiff
path: root/src/feature/control/btrack_circuit.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2020-10-28 09:39:21 -0400
committerNick Mathewson <nickm@torproject.org>2020-10-28 09:41:51 -0400
commit511822529ae1710e141bc26199ec5ff1d1abcd16 (patch)
tree995c016627a6921805bd3fc335a80132cc3109f8 /src/feature/control/btrack_circuit.c
parent4520fbc05e2e3f8288b7e27c45bb2aecbc849f33 (diff)
downloadtor-511822529ae1710e141bc26199ec5ff1d1abcd16.tar.gz
tor-511822529ae1710e141bc26199ec5ff1d1abcd16.zip
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.
Diffstat (limited to 'src/feature/control/btrack_circuit.c')
0 files changed, 0 insertions, 0 deletions