Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/lib/libunwind Missing register validation check.
details: https://anonhg.NetBSD.org/src/rev/7df8a3163096
branches: trunk
changeset: 795825:7df8a3163096
user: joerg <joerg%NetBSD.org@localhost>
date: Sat May 03 23:19:56 2014 +0000
description:
Missing register validation check.
diffstat:
sys/lib/libunwind/DwarfParser.hpp | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diffs (12 lines):
diff -r 7e4d25610469 -r 7df8a3163096 sys/lib/libunwind/DwarfParser.hpp
--- a/sys/lib/libunwind/DwarfParser.hpp Sat May 03 16:43:10 2014 +0000
+++ b/sys/lib/libunwind/DwarfParser.hpp Sat May 03 23:19:56 2014 +0000
@@ -461,6 +461,8 @@
reg = R::dwarf2regno(addressSpace.getULEB128(p, instructionsEnd));
offset =
addressSpace.getULEB128(p, instructionsEnd) * cieInfo.dataAlignFactor;
+ if (reg > kMaxRegisterNumber)
+ return false;
results->savedRegisters[reg].location = kRegisterOffsetFromCFA;
results->savedRegisters[reg].value = offset;
break;
Home |
Main Index |
Thread Index |
Old Index