This is the mail archive of the ecos-patches@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Fix for CONFIG_STRING option in RedBoot


On Mon, 2003-08-18 at 02:26, Xavier Debreuil wrote:
> The default value config_option_any_string.dflt is initialised to 0.
> Then the :
>      case CONFIG_STRING:
>          memcpy(dp, (void *)opt->dflt, config_length(CONFIG_STRING));
> does a memory fault.
> 
> The patch I proposed is wrong indeed.
> The solution is to set a default value to the STRING option :
> 
> RedBoot_config_option("Any string",
>                       any_string,
>                        ALWAYS_ENABLED, true,
>                        CONFIG_STRING,
>                        "default_string"
>     );
> 
> or to check if value of opt->dflt is a valid ram or rom address.
> 

Would you mind filing a bug in our database for this, please?
That way, we can track it and make sure that it gets fixed.

Just visit http://bugs.ecos.sourceware.org/

-- 
Gary Thomas <gary@mlbassoc.com>
MLB Associates


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]