Limit input data in -x mode

Q&A's, tips, howto's
Locked
newdep
Posts: 2038
Joined: Mon Feb 23, 2004 7:40 pm
Location: Netherlands

Limit input data in -x mode

Post 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.
-- (define? (Cornflakes))

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Post 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

newdep
Posts: 2038
Joined: Mon Feb 23, 2004 7:40 pm
Location: Netherlands

Post by newdep »

Oke.. so its always 256 characters also using a 'net-receive in x-event handling?
-- (define? (Cornflakes))

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Post 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

Locked