From: Wolfgang Denk Date: Tue, 27 Jan 2009 21:51:46 +0100 Subject: [U-Boot] fat.c:707: warning: array subscript is above array bounds In-Reply-To: <49443C7F.3020003@ovro.caltech.edu> References: <20081213221301.C91B0832E8A1@gemini.denx.de> <20081213222225.GN15295@game.jcrosoft.org> <20081213224823.57135832E8A1@gemini.denx.de> <49443C7F.3020003@ovro.caltech.edu> Message-ID: <20090127205146.2CFB7832E416@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear David Hawkins, In message <49443C7F.3020003@ovro.caltech.edu> you wrote: > > > In message <20081213222225.GN15295@game.jcrosoft.org> you wrote: > >>> 705 /* Terminate fs_type string. Writing past the end of vistart > >>> 706 is ok - it's just the buffer. */ > >>> 707 vistart->fs_type[8] = '\0'; ... > How about something in the same vein then > > char *c = vistart->fstype; > c[8] = '\0'; Thanks - this is what I actually did. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de ...though his invention worked superbly -- his theory was a crock of sewage from beginning to end. - Vernor Vinge, "The Peace War"