summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathieu Othacehe2021-09-29 12:47:35 +0000
committerArun Isaac2021-10-02 16:00:31 +0530
commitcd8f4cb83fb9aaa86d5bad6979e3bdab7ef7f7b2 (patch)
tree6e7a4f39a8e9d4d35198fa92891a2b4035948a99
parentad378f30835f3144e43b9a94d555e072e0b6417c (diff)
downloadguile-email-cd8f4cb83fb9aaa86d5bad6979e3bdab7ef7f7b2.tar.gz
guile-email-cd8f4cb83fb9aaa86d5bad6979e3bdab7ef7f7b2.tar.lz
guile-email-cd8f4cb83fb9aaa86d5bad6979e3bdab7ef7f7b2.zip
email: Do not use an empty bytevector to test the charset.
Using an empty bytevector no longer throws an exception since Guile commit 5ea8c69e9153a970952bf6f0b32c4fad6a28e839. * email/email.scm (post-process-content-transfer-encoding): Use a bytevector of unit length to test the charset validity. Signed-off-by: Arun Isaac <arunisaac@systemreboot.net>
-rw-r--r--email/email.scm3
1 files changed, 2 insertions, 1 deletions
diff --git a/email/email.scm b/email/email.scm
index 3f4e194..277be88 100644
--- a/email/email.scm
+++ b/email/email.scm
@@ -1,5 +1,6 @@
;;; guile-email --- Guile email parser
;;; Copyright © 2018, 2019, 2020, 2021 Arun Isaac <arunisaac@systemreboot.net>
+;;; Copyright © 2021 Mathieu Othacehe <othacehe@gnu.org>
;;;
;;; This file is part of guile-email.
;;;
@@ -832,7 +833,7 @@ values. The returned headers is a string and body is a bytevector."
(define (valid-charset? charset)
(catch #t
(lambda ()
- (bytevector->string (make-bytevector 0 0) charset)
+ (bytevector->string (make-bytevector 1 0) charset)
#t)
(const #f)))