Re: [PATCH] s390: Hypervisor File System

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 28 April 2006 19:36:30 +0200, Michael Holzheu wrote:
> Andrew Morton <[email protected]> wrote on 04/28/2006 11:56:21 AM:
> > Michael Holzheu <[email protected]> wrote:
> 
> > > +static int diag224_idx2name(int index, char *name)
> > > +{
> > > +   memcpy(name, diag224_cpu_names + ((index + 1) * 16), 16);
> > > +   name[16] = 0;
> >
> > Should this be "15"?   I guess not...
> 
> No bug, our strings here have 16 characters and are not
> 0 terminated.

Hmm.  TMP_SIZE is defined to 64 and used for buffers allocated on the
stack.  It is not too excessive, but in this case 17 would definitely
be enough.  Not sure if it's worth going through.

Jörn

-- 
My second remark is that our intellectual powers are rather geared to
master static relations and that our powers to visualize processes
evolving in time are relatively poorly developed.
-- Edsger W. Dijkstra
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux