[Tutor] Safely buffering user input

2005-01-27 Thread Miles Stevenson
Newbie question. I'm trying to practice safe coding techniques. I just want to make sure that a user can't supply a massive argument to my script and cause trouble. I'm just trying only accept about 256 bytes: buffer(sys.argv[1], 0, 256) searchpath = sys.argv[1] The script runs successfully,

Re: [Tutor] Safely buffering user input

2005-01-27 Thread Danny Yoo
On Thu, 27 Jan 2005, Miles Stevenson wrote: I'm trying to practice safe coding techniques. I just want to make sure that a user can't supply a massive argument to my script and cause trouble. I'm just trying only accept about 256 bytes: buffer(sys.argv[1], 0, 256) ^^ Hi Miles,