Skip to content

Commit 558b920

Browse files
committed
Merge tag 'probes-fixes-v7.0-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace
Pull tracing probe fix from Masami Hiramatsu: "Reject non-closed empty immediate strings Fix a buffer index underflow bug that occurred when passing an non-closed empty immediate string to the probe event" * tag 'probes-fixes-v7.0-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: tracing/probe: reject non-closed empty immediate strings
2 parents 6b5199f + 4346be6 commit 558b920

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

kernel/trace/trace_probe.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1068,7 +1068,7 @@ static int __parse_imm_string(char *str, char **pbuf, int offs)
10681068
{
10691069
size_t len = strlen(str);
10701070

1071-
if (str[len - 1] != '"') {
1071+
if (!len || str[len - 1] != '"') {
10721072
trace_probe_log_err(offs + len, IMMSTR_NO_CLOSE);
10731073
return -EINVAL;
10741074
}

0 commit comments

Comments
 (0)