summaryrefslogtreecommitdiff
path: root/lib/cpu-notifier-error-inject.c
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2013-03-06 19:10:29 -0800
committerJohn Stultz <john.stultz@linaro.org>2016-02-16 13:54:09 -0800
commit409b642dddb87e84d37c0463a5fa06adcf230aa4 (patch)
treeb265a78e8165b3af96fff22af8e8df74f18a3277 /lib/cpu-notifier-error-inject.c
parent19329cdd0d6c9fd596959f00a5d66d5b4603fb6c (diff)
of: fix CONFIG_CMDLINE_EXTEND
strlcat takes the size of the buffer, not the number of characters to concatenate. If the size of the device tree command line p is larger than the CONFIG_CMDLINE string data, then strcat(data, p, l) will hit a BUG_ON because strlen(data) > l. Replace the second strlcat with a strncpy plus a manual null termination. Also rearrange the code to reduce indent depth to make it more readable, and replace data with a char *cmdline to avoid extra casts. Signed-off-by: Colin Cross <ccross@android.com>
Diffstat (limited to 'lib/cpu-notifier-error-inject.c')
0 files changed, 0 insertions, 0 deletions