[U-Boot-Users] Bug in tools/fw_env.c ?

14 Sep
2005
14 Sep
'05
6:30 a.m.
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@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.
=======================================================================
7175
Age (days ago)
7175
Last active (days ago)
0 comments
1 participants
participants (1)
-
Robin Gilks