From e56f8ad294d269bcb918c15168bf7b0c4f858fb4 Mon Sep 17 00:00:00 2001 From: Leah Neukirchen Date: Fri, 3 Apr 2020 22:46:35 +0200 Subject: blaze822: blaze822_addr: null-terminate ttok at the current position before appending --- t/1501-maddr-regress.t | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 't') diff --git a/t/1501-maddr-regress.t b/t/1501-maddr-regress.t index 37b592a..4e6be77 100755 --- a/t/1501-maddr-regress.t +++ b/t/1501-maddr-regress.t @@ -1,7 +1,7 @@ #!/bin/sh cd ${0%/*} . ./lib.sh -plan 31 +plan 33 check_addr() { printf "From: %s\n" "$1" | check_test "parse $1" = "$2" "maddr /dev/stdin" @@ -46,3 +46,6 @@ check_addr 'test."test"@example.org' 'test.test@example.org' check_addr '' 'test.test@example.org' check_addr 'test"test"@example.org' 'testtest@example.org' check_addr '' 'testtest@example.org' + +check_addr 'foo' 'foo ' +check_addr 'xxxxxxxxx a"test"@example.org' "xxxxxxxxx " -- cgit 1.4.1