[Closure-devel] a bug in read-pcdata (source file: sgml-parse.lisp)

lookwong look.wangluke at gmail.com
Mon Jun 30 07:34:42 UTC 2014


In function read-pcdata:

*(t *
*      (setf (aref scratch sp) ch)    ;recode character read*
*      (setf sp (the fixnum (+ sp 1)))*
*
<http://repo.or.cz/w/closure-html.git/blob/HEAD:/src/parse/sgml-parse.lisp#l371>
(cond ((= sp se)                         ;end of scratch pad reached?*
*            (enlarge-scratch-pad input)*
*            (setf scratch (a-stream-scratch input)*
*                   se (length scratch))))))))*



Should first enlarge the input buffer, or will cause out of index error.


*(t**
(cond ((= sp se)                         ;end of scratch pad reached?*
*       (enlarge-scratch-pad input)*
*       (setf scratch (a-stream-scratch input)*
*               se (length scratch))))*

*      (setf (aref scratch sp) ch)    ;recode character read*
*      (setf sp (the fixnum (+ sp 1)))**))))*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/closure-devel/attachments/20140630/ab3b9dd4/attachment.html>


More information about the closure-devel mailing list