[gmpi] Re: 3.11 topic: Dynamic plugin structure

On Sat, May 01, 2004 at 03:04:29PM +1200, Jeff McClintock wrote:
> ..and don't mean you actually store a long list of strings...you can
> generate them on-the-fly...
> 
>     sprintf(  "channel%d/%s" , chan, synthChanParamNames[param] );

Surely you meant snprintf, with a bounded string.  I *know* that no
experienced programmer would actually use sprintf without knowing exactly
how long the results would be.

string handling like this is full of simple mistakes, so we would be wise
to avoid it wherever possible.

----------------------------------------------------------------------
Generalized Music Plugin Interface (GMPI) public discussion list
Participation in this list is contingent upon your abiding by the
following rules:  Please stay on topic.  You are responsible for your own
words.  Please respect your fellow subscribers.  Please do not
redistribute anyone else's words without their permission.

Archive: http://www.freelists.org/archives/gmpi
Email gmpi-request@xxxxxxxxxxxxx w/ subject "unsubscribe" to unsubscribe

Other related posts: