mirror of
https://github.com/yuzu-emu/breakpad
synced 2024-11-22 22:03:36 +00:00
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,8 +251,11 @@ struct StackFrameARM : public StackFrame {
|
||||||
|
|
||||||
// Return the ContextValidity flag for register rN.
|
// Return the ContextValidity flag for register rN.
|
||||||
static ContextValidity RegisterValidFlag(int n) {
|
static ContextValidity RegisterValidFlag(int n) {
|
||||||
|
if (0 <= n && n <= 15) {
|
||||||
return ContextValidity(1 << n);
|
return ContextValidity(1 << n);
|
||||||
}
|
}
|
||||||
|
return CONTEXT_VALID_NONE;
|
||||||
|
}
|
||||||
|
|
||||||
// Register state. This is only fully valid for the topmost frame in a
|
// Register state. This is only fully valid for the topmost frame in a
|
||||||
// stack. In other frames, the values of nonvolatile registers may be
|
// stack. In other frames, the values of nonvolatile registers may be
|
||||||
|
|
Loading…
Reference in a new issue