[Trac #569] olpc-csound-server breaks on long commands

Zarro Boogs per Child bugtracker at laptop.org
Tue Dec 12 14:29:16 EST 2006


#569: olpc-csound-server breaks on long commands
--------------------+-------------------------------------------------------
 Reporter:  jaberg  |       Owner:  blizzard
     Type:  defect  |      Status:  new     
 Priority:  high    |   Milestone:  BTest-2 
Component:  distro  |    Keywords:          
--------------------+-------------------------------------------------------
 The main server loop reads 1024 characters from the socket, and tries to
 exec that text.  If the incoming command is longer than 1024 chars, then
 in general, that command will silently fail.

 The reason this came up is that I thought it would be more efficient to
 send several commands in a single string.  This way I created long
 commands that triggered the problem.

 I think the simplest way to fix this bug would be to drain the socket when
 receiving a message.

 While the server loop is under review... perhaps now would be the time to
 tighten up the potential security hole:  instead of reading (and
 executing) the entire string "perf.function('...')" , read just the
 strings '...' from the socket (newline-delimited?), and pass them as
 arguments to perf.InputMessage().

-- 
Ticket URL: <http://dev.laptop.org/ticket/569>
One Laptop Per Child <http://laptop.org/>



More information about the Bugs mailing list