From c0d9ae9377cb7daf22709152838307a984a47ed6 Mon Sep 17 00:00:00 2001
From: Chris Hanson <org/chris-hanson/cph>
Date: Wed, 3 May 2017 01:03:24 -0700
Subject: [PATCH] Fix missed regexp in mime-codec.

---
 src/runtime/mime-codec.scm | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/src/runtime/mime-codec.scm b/src/runtime/mime-codec.scm
index eb3c13f6d..f2928cca6 100644
--- a/src/runtime/mime-codec.scm
+++ b/src/runtime/mime-codec.scm
@@ -937,7 +937,7 @@ USA.
 	(else (error "Illegal state in uuencode decoder:" state))))
 
     (define (process-begin-line line)
-      (if (not (re-string-match "^begin +[0-7]+ +.+$" line))
+      (if (not (regsexp-match-string decode-uue:begin-line-regsexp line))
 	  (error:decode-uue "Malformed \"begin\" line:" line))
       (set! state 'normal))
 
@@ -1013,6 +1013,16 @@ USA.
 	(error "Illegal uuencode char:" char))
     (fix:and (fix:- n #x20) #x3F)))
 
+(define decode-uue:begin-line-regsexp
+  (compile-regsexp
+   '(seq (line-start)
+	 "begin"
+	 (+ #\space)
+	 (+ (char-set (48 . 56)))
+	 (+ #\space)
+	 (+ (any-char))
+	 (line-end))))
+
 (define (call-with-decode-uue-output-port port text? generator)
   (let ((port (make-decode-uue-port port text?)))
     (let ((v (generator port)))
-- 
2.25.1