gnu: dovecot: Update to 2.2.28.
[jackhill/guix/guix.git] / gnu / packages / patches / chicken-CVE-2016-6830+CVE-2016-6831.patch
1 diff -ur a/irregex-core.scm b/irregex-core.scm
2 --- a/irregex-core.scm 2016-09-11 19:03:00.000000000 -0400
3 +++ b/irregex-core.scm 2017-01-01 22:24:08.000000000 -0500
4 @@ -30,6 +30,8 @@
5
6 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
7 ;;;; History
8 +;; 0.9.6: 2016/12/05 - fixed exponential memory use of + in compilation
9 +;; of backtracking matcher.
10 ;; 0.9.5: 2016/09/10 - fixed a bug in irregex-fold handling of bow
11 ;; 0.9.4: 2015/12/14 - performance improvement for {n,m} matches
12 ;; 0.9.3: 2014/07/01 - R7RS library
13 @@ -3170,16 +3172,7 @@
14 ((sre-empty? (sre-sequence (cdr sre)))
15 (error "invalid sre: empty *" sre))
16 (else
17 - (letrec
18 - ((body
19 - (lp (sre-sequence (cdr sre))
20 - n
21 - flags
22 - (lambda (cnk init src str i end matches fail)
23 - (body cnk init src str i end matches
24 - (lambda ()
25 - (next cnk init src str i end matches fail)
26 - ))))))
27 + (let ((body (rec (list '+ (sre-sequence (cdr sre))))))
28 (lambda (cnk init src str i end matches fail)
29 (body cnk init src str i end matches
30 (lambda ()
31 @@ -3204,10 +3197,21 @@
32 (lambda ()
33 (body cnk init src str i end matches fail))))))))
34 ((+)
35 - (lp (sre-sequence (cdr sre))
36 - n
37 - flags
38 - (rec (list '* (sre-sequence (cdr sre))))))
39 + (cond
40 + ((sre-empty? (sre-sequence (cdr sre)))
41 + (error "invalid sre: empty +" sre))
42 + (else
43 + (letrec
44 + ((body
45 + (lp (sre-sequence (cdr sre))
46 + n
47 + flags
48 + (lambda (cnk init src str i end matches fail)
49 + (body cnk init src str i end matches
50 + (lambda ()
51 + (next cnk init src str i end matches fail)
52 + ))))))
53 + body))))
54 ((=)
55 (rec `(** ,(cadr sre) ,(cadr sre) ,@(cddr sre))))
56 ((>=)
57 diff -ur a/irregex-utils.scm b/irregex-utils.scm
58 --- a/irregex-utils.scm 2016-09-11 19:03:00.000000000 -0400
59 +++ b/irregex-utils.scm 2017-01-01 22:25:25.000000000 -0500
60 @@ -89,7 +89,7 @@
61 (case (car x)
62 ((: seq)
63 (cond
64 - ((and (pair? (cddr x)) (pair? (cddr x)) (not (eq? x obj)))
65 + ((and (pair? (cdr x)) (pair? (cddr x)) (not (eq? x obj)))
66 (display "(?:" out) (for-each lp (cdr x)) (display ")" out))
67 (else (for-each lp (cdr x)))))
68 ((submatch)
69 diff -ur "a/manual-html/Unit irregex.html" "b/manual-html/Unit irregex.html"
70 --- "a/manual-html/Unit irregex.html" 2016-09-11 19:10:47.000000000 -0400
71 +++ "b/manual-html/Unit irregex.html" 2017-01-01 22:26:05.000000000 -0500
72 @@ -353,6 +353,6 @@
73 <dd class="defsig"><p>Returns an optimized SRE matching any of the literal strings in the list, like Emacs' <tt>regexp-opt</tt>. Note this optimization doesn't help when irregex is able to build a DFA.</p></dd>
74 </dl>
75 <h5 id="sec:sre-.3estring"><a href="#sec:sre-.3estring">sre-&gt;string</a></h5><dl class="defsig"><dt class="defsig" id="def:sre-.3estring"><span class="sig"><tt>(sre-&gt;string &lt;sre&gt;)</tt></span> <span class="type">procedure</span></dt>
76 -<dd class="defsig"><p>Convert an SRE to a POSIX-style regular expression string, if possible.</p></dd>
77 +<dd class="defsig"><p>Convert an SRE to a PCRE-style regular expression string, if possible.</p></dd>
78 </dl>
79 -<hr /><p>Previous: <a href="Unit%20extras.html">Unit extras</a></p><p>Next: <a href="Unit%20srfi-1.html">Unit srfi-1</a></p></div></div></body>
80 \ No newline at end of file
81 +<hr /><p>Previous: <a href="Unit%20extras.html">Unit extras</a></p><p>Next: <a href="Unit%20srfi-1.html">Unit srfi-1</a></p></div></div></body>