escape query strings in some of the newlisp code that I have looked at.
In the mysql5 module that comes with the distribution and also in Jeff's
own modifications, I am finding the following form in the (escape)
procedure:
Code: Select all
(set 'safe-value (dup " " (+ 1 (length value))))
byte than the source. There should be enough bytes to escape _all_
characters (factor of 2)- if necessary, plus a byte for the terminating
NULL byte that is standard for C. I.E. length*2+1
unless I'm wrong, the form should read:
Code: Select all
(set 'safe-value (dup " " (+ 1 (* 2 (length value)))))
the source, plus a byte for the terminating NULL.
My modification shows predictable results, the original code
resulted in much strange behavior. :-)
references:
http://dev.mysql.com/doc/refman/5.1/en/ ... tring.html
Tim
(an 'old '(in more ways than one) 'C dog)