Skip to content
Commit d5b4c2f4 authored by Chen Gang's avatar Chen Gang Committed by Martin Schwidefsky
Browse files

arch: s390: appldata: using strncpy() and strnlen() instead of sprintf()



'buf[2]' is 2 bytes length, and sprintf() will append '\0' at the end
of string "?\n", so original implementation is memory overflow.

Need use strncpy() and strnlen() instead of sprintf().

Signed-off-by: default avatarChen Gang <gang.chen@asianux.com>
Signed-off-by: default avatarGerald Schaefer <gerald.schaefer@de.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent 9acf73b7
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment