Fix RegisterValidFlag
Return CONTEXT_VALID_NONE if register num is greater than 15 or negative. Change-Id: I7203d9d51f54e5d589f9ea6fd62bbbaa71de3a4d Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3336256 Reviewed-by: Joshua Peraza <jperaza@chromium.org>
This commit is contained in:
parent
64b25d6653
commit
b6510f998a
1 changed files with 4 additions and 1 deletions
|
@ -251,7 +251,10 @@ struct StackFrameARM : public StackFrame {
|
|||
|
||||
// Return the ContextValidity flag for register rN.
|
||||
static ContextValidity RegisterValidFlag(int n) {
|
||||
return ContextValidity(1 << n);
|
||||
if (0 <= n && n <= 15) {
|
||||
return ContextValidity(1 << n);
|
||||
}
|
||||
return CONTEXT_VALID_NONE;
|
||||
}
|
||||
|
||||
// Register state. This is only fully valid for the topmost frame in a
|
||||
|
|
Loading…
Reference in a new issue