From c8d9c202d182d1e779f88533c1d174c2f7d5209c Mon Sep 17 00:00:00 2001 From: Joshua Elsasser Date: Thu, 22 Nov 2012 14:55:56 -0500 Subject: [PATCH] Don't pass user-defined strings to printf(). This allows % to be safely used in lisp symbol names which pass through the groveler, such as the following: (cvar ("errno" %errno) :int) --- grovel/grovel.lisp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grovel/grovel.lisp b/grovel/grovel.lisp index e582fe9a1137..4c2da1ac2cfa 100644 --- a/grovel/grovel.lisp +++ b/grovel/grovel.lisp @@ -89,7 +89,7 @@ int main(int argc, char**argv) { (defun c-format (out fmt &rest args) (let ((text (unescape-for-c (format nil "~?" fmt args)))) - (format out "~& fprintf(output, \"~A\");~%" text))) + (format out "~& fputs(\"~A\", output);~%" text))) (defun c-printf (out fmt &rest args) (flet ((item (item)