Neale Ferguson <nealefergu...@verizon.net> wrote:

> Similarly, in $SRC/cmd/avs/dsw/iiadm.c there are several instances of 
> statements like:
>
> io->shadow_vol[DSW_NAMELEN] = '\0';
>
> shadow_vol is defined as being DSW_NAMELEN elements long so this statement is 
> overwriting the byte immediately after this array  (for example 
> bitmap_vol[DSW_NAMELEN] follows shadow_vol in one particular structure). 
> Should the array be defined as DSW_NAMELEN+1 or should the code alter 
> shadow_vol[DSW_NAMELEN-1]?

This is a typial case tjhat could be detected by Coverity. Does somebody run 
Coverity on the code from time to time?

Jörg

-- 
 EMail:jo...@schily.isdn.cs.tu-berlin.de (home) Jörg Schilling D-13353 Berlin
       j...@cs.tu-berlin.de                (uni)  
       joerg.schill...@fokus.fraunhofer.de (work) Blog: 
http://schily.blogspot.com/
 URL:  http://cdrecord.berlios.de/private/ ftp://ftp.berlios.de/pub/schily
_______________________________________________
opensolaris-code mailing list
opensolaris-code@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to