From: Robin Gilks Date: Wed, 14 Sep 2005 16:30:18 +1200 Subject: [U-Boot-Users] Bug in tools/fw_env.c ? Message-ID: <4327A75A.4060707@tait.co.nz> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Greetings Just a quick arm wave to see if I have the logic right. In a redundant environment when both sets are corrupt, the env_init function sets the environment data pointer to the default data. If this is then added to by the fw_setenv function, the memory overwritten is not the calloc'ed space that is big enough to hold the extra data but the initialised memory of the program that contains the defaults! Methinks that the defaults should be memcpy'ed into the calloc'ed space. I've not looked at the non-redundant env case. -- Robin Gilks Senior Design Engineer Phone: (+64)(3) 357 1569 Tait Electronics Fax : (+64)(3) 359 4632 PO Box 1645 Christchurch Email : robin.gilks at tait.co.nz New Zealand ======================================================================= This email, including any attachments, is only for the intended addressee. It is subject to copyright, is confidential and may be the subject of legal or other privilege, none of which is waived or lost by reason of this transmission. If the receiver is not the intended addressee, please accept our apologies, notify us by return, delete all copies and perform no other act on the email. Unfortunately, we cannot warrant that the email has not been altered or corrupted during transmission. =======================================================================