Commit 7799d376 authored by Nicolas Boichat's avatar Nicolas Boichat Committed by Kleber Sacilotto de Souza

scripts/decode_stacktrace: match basepath using shell prefix operator, not regex

BugLink: https://bugs.launchpad.net/bugs/1845395

[ Upstream commit 31013836 ]

The basepath may contain special characters, which would confuse the regex
matcher.  ${var#prefix} does the right thing.

Link: http://lkml.kernel.org/r/20190518055946.181563-1-drinkcat@chromium.org
Fixes: 67a28de4 ("scripts/decode_stacktrace: only strip base path when a prefix of the path")
Signed-off-by: default avatarNicolas Boichat <drinkcat@chromium.org>
Reviewed-by: default avatarStephen Boyd <swboyd@chromium.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarConnor Kuehl <connor.kuehl@canonical.com>
Signed-off-by: default avatarKhalid Elmously <khalid.elmously@canonical.com>
parent c780daaa
......@@ -64,7 +64,7 @@ parse_symbol() {
fi
# Strip out the base of the path
code=${code//^$basepath/""}
code=${code#$basepath/}
# In the case of inlines, move everything to same line
code=${code//$'\n'/' '}
......
Markdown is supported
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