[cldoc-devel] unsafe format string passed to write-html in make-summary

Taylor, Joshua tayloj at rpi.edu
Tue Aug 28 15:00:34 UTC 2007


Hello all,

I was just writing some functions for character dispatch macros, and
some of these had some interesting names. Particularly,

(defun |#~-reader| (...)
   ...)

In make-summary, in html.lisp, there's a form

(html-write (purge-string-for-html (name desc)))

which chokes because (purge-string-for-html (name desc)) becomes
"|#~-reader|", and (html-write "|#~-reader|") expands to (Format
*Html-Output-Stream* "|#~-reader|"), but that ~- is problematic. I
found the simple fix by adding a format string, "~a.", i.e.,

611c611
<                    (html-write "~a" (purge-string-for-html (name desc)))))
---
>                    (html-write (purge-string-for-html (name desc)))))

which seems to agree with the usage in line 614.

-- 
=====================
Joshua Taylor
tayloj at rpi.edu

"A lot of good things went down one time,
     back in the goodle days."
               John Hartford



More information about the cldoc-devel mailing list