Neale Ferguson <[email protected]> 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:[email protected] (home) Jörg Schilling D-13353 Berlin [email protected] (uni) [email protected] (work) Blog: http://schily.blogspot.com/ URL: http://cdrecord.berlios.de/private/ ftp://ftp.berlios.de/pub/schily _______________________________________________ opensolaris-code mailing list [email protected] http://mail.opensolaris.org/mailman/listinfo/opensolaris-code
