crash/SOURCES/github_b1a6e13a_p_regressio...

29 lines
798 B
Diff

commit b1a6e13a93661dfae7df15fe32862bddf4026c80
Author: Dave Anderson <anderson@redhat.com>
Date: Tue May 21 14:09:13 2019 -0400
Fix for a crash-7.2.6 regression to the "p" command. Without the
patch, a gdb pass-through command construct such as:
p ((struct zone *)0xffff901e3ffda000)->min_slab_pages
gets parsed incorrectly, and the "-" is mistaken for an argument
option, and each of the subsequent characters are marked as an
"invalid option".
(dwysocha@redhat.com)
diff --git a/tools.c b/tools.c
index eceea90..2d95c3a 100644
--- a/tools.c
+++ b/tools.c
@@ -246,8 +246,10 @@ next:
break;
}
}
- if (expression == 0)
+ if (expression == 0) {
i++;
+ continue;
+ }
}
if (str[i] != NULLCHAR && str[i] != '\n') {