Subject: FTP parses % in commands.
To: None <current-users@netbsd.org>
From: Lundman <lundman@argonaut.com>
List: current-users
Date: 09/01/1998 12:46:11
My appologies if this is old news and already known.

NetBSD 1.3.2 kernel & userland.


But a user recently found this when they tried to add a wall message
which contained a % sign.  

I assume this is due to that *printf() is used to send the string in the
format section instead of as a plain string.

Examples are:

ftp> debug
Debugging on (debug=1).
ftp> quote gaga "hello %d fun"
---> gaga hello 1 fun
ftp> quote gaga "hello %f fun"
---> gaga hello
-193129487153633441986548221775893166954638926970105325446605895620823065640019571730925942360591320784451815682782741365104982200474808502279152951739571284465179268226536292688313312699715066526964086009162755976030181339552546816.000000
fun
500 'gaga': command not understood.
ftp> quote gaga "hello %s fun"
Segmentation fault (core dumped)


etc etc.

This "bug" is also present in Irix, Linux and Dec OS's, possibly more.


Have fun :)

Lund



-- 
Jorgen Lundman
Programmer
Argonaut
http://www.argonaut.com
http://www.whiterose.net/users/lundman