From 1c8e10bcebe7f39ca238a5dfbd1bd92c9faa39b8 Mon Sep 17 00:00:00 2001 From: Aleksandr Nogikh Date: Tue, 22 Nov 2022 10:37:05 +0000 Subject: prog: handle broken base64 strings Currently it can fail if there's never a closing quote. Add a test to verify this behavior. --- prog/encoding_test.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'prog/encoding_test.go') diff --git a/prog/encoding_test.go b/prog/encoding_test.go index 4cb836922..73c2cabcc 100644 --- a/prog/encoding_test.go +++ b/prog/encoding_test.go @@ -331,6 +331,10 @@ func TestDeserialize(t *testing.T) { In: `test$opt2(0x0) (fail_nth: 0)`, Out: `test$opt2(0x0)`, }, + { + In: `test$str2(&(0x7f0000000000)="$eJwqrqzKTszJSS0CBAAA//8TyQPi`, + Err: `want ", got EOF`, + }, }) } -- cgit mrf-deployment