diff options
author | Stefan Agner <stefan.agner@toradex.com> | 2015-08-11 15:24:49 +0200 |
---|---|---|
committer | Stefan Agner <stefan.agner@toradex.com> | 2015-08-11 15:24:49 +0200 |
commit | f9e7649338178f823e291386dde5086ad636b703 (patch) | |
tree | 5cecc4d0d247a12735e22817f30faaba4899edd3 | |
parent | 9e44a61afa422546196fcbf6b04ab84818653066 (diff) |
ARM: vf610: use strcpy for soc environemnt variableColibri_VF_LinuxImageV2.5Beta1_20150813
To create the soc environment variable we concatenate two strings
on the stack. So far, strcat has been used for the first string as
well as for the second string. Since the variable on the stack is
not initialized, the first strcat may not start using the first
entry in the character array. This then could lead to an buffer
overflow on the stack.
-rw-r--r-- | arch/arm/cpu/armv7/vf610/generic.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/cpu/armv7/vf610/generic.c b/arch/arm/cpu/armv7/vf610/generic.c index c779aeda797..f0a6965aa94 100644 --- a/arch/arm/cpu/armv7/vf610/generic.c +++ b/arch/arm/cpu/armv7/vf610/generic.c @@ -346,7 +346,7 @@ int arch_misc_init(void) { char soc[6]; - strcat(soc, "vf"); + strcpy(soc, "vf"); strcat(soc, soc_type); setenv("soc", soc); |