From tayloj at rpi.edu Tue Aug 28 15:00:34 2007 From: tayloj at rpi.edu (Taylor, Joshua) Date: Tue, 28 Aug 2007 11:00:34 -0400 Subject: [cldoc-devel] unsafe format string passed to write-html in make-summary Message-ID: <1c3ea73c0708280800s192ccb60v923586ddfa556bd3@mail.gmail.com> 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 From hatchond at yahoo.fr Tue Aug 28 21:47:00 2007 From: hatchond at yahoo.fr (Iban HATCHONDO) Date: Tue, 28 Aug 2007 21:47:00 +0000 (GMT) Subject: [cldoc-devel] unsafe format string passed to write-html in make-summary Message-ID: <642976.43679.qm@web27612.mail.ukl.yahoo.com> Hi, I think you're right. Since the html-write macro is made to be used without control-string when a proper string is given. Or in the present case it is obvious that a descriptor name is not a safe string for format, and is used everywhere else with a "~a" control string. So, unless one wants to report some potential glitch or side effect of this patch I'll apply it asap. Kind regards, Iban. ----- Message d'origine ---- De : "Taylor, Joshua" ? : cldoc-devel at common-lisp.net Envoy? le : Mardi, 28 Ao?t 2007, 17h00mn 34s Objet : [cldoc-devel] unsafe format string passed to write-html in make-summary 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 _______________________________________________ cldoc-devel mailing list cldoc-devel at common-lisp.net http://common-lisp.net/cgi-bin/mailman/listinfo/cldoc-devel _____________________________________________________________________________ Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail