Page 1 of 1

Limit input data in -x mode

Posted: Thu Dec 08, 2005 9:15 pm
by newdep
Hi Lutz,

How can I limit the amount of data that is taken by newlisp running
in -x mode?

I.e. what does this do exactly internaly in newlisp ->
(define (x-event request) (print request))
Does it do any buffering internaly in newlisp? Could it be a security risk?

I want to prevent newlisp from overrunning the buffer.. or at least preventing newlisp from buffer problems etc...

any hint is welcome..

regards, Norman.

Posted: Thu Dec 08, 2005 10:03 pm
by Lutz
Input line length is limited to 254 characters, no buffer overflow is possible. As of my knowledge there are no buffer overfllow situations possible in newLISP. The code has been specfically cleaned up for this.

Lutz

Posted: Thu Dec 08, 2005 10:31 pm
by newdep
Oke.. so its always 256 characters also using a 'net-receive in x-event handling?

Posted: Sat Dec 10, 2005 11:25 pm
by Lutz
Only the parameter passed by x-event is limited to 255. In 'net-receive' you define the maximum of chars to receive in the size parameter.

Lutz