slackbuilds_ponce/development/chicken/patches/02_all_CVE-2013-2024.patch
Erik Falor 7009dc6a71 development/chicken: Updated for version 4.8.0.4.
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
2013-10-27 23:38:56 -05:00

47 lines
1.4 KiB
Diff
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

From http://code.call-cc.org/cgi-bin/gitweb.cgi?p=chicken-core.git;a=commit;h=58684f69572453acc6fed7326fa9df39be98760e
--- chicken-4.8.0.3/setup-api.scm
+++ chicken-4.8.0.3/setup-api.scm
@@ -239,7 +239,7 @@
(cond ((string=? prg "csc")
(string-intersperse
(cons*
- (shellpath (find-program "csc"))
+ (find-program "csc")
"-feature" "compiling-extension"
(if (or (deployment-mode)
(and (feature? #:cross-chicken)
--- chicken-4.8.0.3/utils.scm
+++ chicken-4.8.0.3/utils.scm
@@ -59,20 +59,18 @@
;;; Quote string for shell
(define (qs str #!optional (platform (build-platform)))
- (case platform
- ((mingw32)
- (string-append "\"" str "\""))
- (else
- (if (zero? (string-length str))
- "''"
- (string-concatenate
- (map (lambda (c)
- (if (or (char-whitespace? c)
- (memq c '(#\# #\" #\' #\` #\´ #\~ #\& #\% #\$ #\! #\* #\;
- #\< #\> #\\ #\( #\) #\[ #\] #\{ #\} #\?)))
- (string #\\ c)
- (string c)))
- (string->list str)))))))
+ (let ((delim (if (eq? platform 'mingw32) #\" #\'))
+ (escaped (if (eq? platform 'mingw32) "\"\"" "'\\''")))
+ (string-append
+ (string delim)
+ (string-concatenate
+ (map (lambda (c)
+ (cond
+ ((char=? c delim) escaped)
+ ((char=? c #\nul) (error 'qs "NUL character can not be represented in shell string" str))
+ (else (string c))))
+ (string->list str)))
+ (string delim))))
;;; Compile and load file