diff options
author | Dan Carpenter <[email protected]> | 2023-07-18 10:05:34 +0300 |
---|---|---|
committer | Hans de Goede <[email protected]> | 2023-07-26 16:16:22 +0200 |
commit | b3a8692d2c6632ddaa41ca61544b632c49e75efc (patch) | |
tree | 3b5e03bee497ecd9c2215e49c0d72b65b898027d /tools/perf/scripts/python/arm-cs-trace-disasm.py | |
parent | 93d99fd8e605c09ae8521a19c2b08b57b8cc4165 (diff) |
platform/x86: hp-bioscfg: prevent a small buffer overflow
This function escapes certain special characters like \n. So if the
last character in the string is a '\n' then it gets changed into two
characters '\' and '\n'. But maybe we only have space for the '\' so
we need to check for that.
The "conv_dst_size" variable is always less than or to equal the "size"
variable. It's easier to just check "conv_dst_size" instead of checking
both.
Fixes: a34fc329b189 ("platform/x86: hp-bioscfg: bioscfg")
Signed-off-by: Dan Carpenter <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Reviewed-by: Jorge Lopez <[email protected]>
Signed-off-by: Hans de Goede <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/arm-cs-trace-disasm.py')
0 files changed, 0 insertions, 0 deletions