Skip to content

Commit 3101383

Browse files
drinkcattorvalds
authored andcommitted
scripts/decode_stacktrace: match basepath using shell prefix operator, not regex
The basepath may contain special characters, which would confuse the regex matcher. ${var#prefix} does the right thing. Link: http://lkml.kernel.org/r/[email protected] Fixes: 67a28de ("scripts/decode_stacktrace: only strip base path when a prefix of the path") Signed-off-by: Nicolas Boichat <[email protected]> Reviewed-by: Stephen Boyd <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent a760f8a commit 3101383

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/decode_stacktrace.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ parse_symbol() {
8585
fi
8686

8787
# Strip out the base of the path
88-
code=${code//^$basepath/""}
88+
code=${code#$basepath/}
8989

9090
# In the case of inlines, move everything to same line
9191
code=${code//$'\n'/' '}

0 commit comments

Comments
 (0)