Re: [KJ] [patch] net/tipc: sprintf/strcpy conversion

2006-11-03 Thread Hagen Paul Pfeifer
* Alexey Dobriyan | 2006-11-03 03:09:05 [+0300]: >On Wed, Nov 01, 2006 at 03:06:24PM +0100, Florian Westphal wrote: >> convert sprintf(a,b) to strcpy(a,b). Make tipc_bclink_name[] const. > >Ahhh, I missed the start of threads. > >Patch is useless because it changes one unbounded string function in

Re: [KJ] [patch] net/tipc: sprintf/strcpy conversion

2006-11-02 Thread Alexey Dobriyan
On Wed, Nov 01, 2006 at 03:06:24PM +0100, Florian Westphal wrote: > convert sprintf(a,b) to strcpy(a,b). Make tipc_bclink_name[] const. Ahhh, I missed the start of threads. Patch is useless because it changes one unbounded string function into another unbounded string function. > --- a/net/tipc/

Re: [KJ] [patch] net/tipc: sprintf/strcpy conversion

2006-11-01 Thread walter harms
David Miller wrote: > From: walter harms <[EMAIL PROTECTED]> > Date: Wed, 01 Nov 2006 22:38:26 +0100 > >> These line >> +strcpy(bcbearer->media.name, "tipc-multicast"); >> >> i gues that means tipc_bclink_name ? mea culpa, i should not write mail when tired. > > Why? The original code u

Re: [tipc-discussion] [KJ] [patch] net/tipc: sprintf/strcpy conversion

2006-11-01 Thread Florian Westphal
walter harms <[EMAIL PROTECTED]> wrote: > These line >+ strcpy(bcbearer->media.name, "tipc-multicast"); > i gues that means tipc_bclink_name ? The idea was to change how things are done, not _what_ is being done. > an even more secure version could be like this: > > > strncpy(bcbear

Re: [KJ] [patch] net/tipc: sprintf/strcpy conversion

2006-11-01 Thread David Miller
From: walter harms <[EMAIL PROTECTED]> Date: Wed, 01 Nov 2006 22:38:26 +0100 > These line > + strcpy(bcbearer->media.name, "tipc-multicast"); > > i gues that means tipc_bclink_name ? Why? The original code used "tipc-multicast" which is a different string than tipc_bclink_name which is "mul

Re: [KJ] [patch] net/tipc: sprintf/strcpy conversion

2006-11-01 Thread walter harms
hi Florian, These line + strcpy(bcbearer->media.name, "tipc-multicast"); i gues that means tipc_bclink_name ? an even more secure version could be like this: strncpy(bcbearer->media.name,sizeof(bcbearer->media.name),tipc_bclink_name); (in case someone ever changes the size of cb