summaryrefslogtreecommitdiff
path: root/kernel/sys.c
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2013-03-06 19:10:29 -0800
committerColin Cross <ccross@android.com>2014-04-17 20:02:30 -0700
commita2acc58bc7460a03627f20842a7169d7a1328299 (patch)
tree7699e67d5e5954ff6775ee98cff9a7fe27206b89 /kernel/sys.c
parenta0f3f0f28e1636405b4c736eb7b9bd557cf11ad7 (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 'kernel/sys.c')
0 files changed, 0 insertions, 0 deletions