about summary refs log tree commit diff homepage
path: root/lib/Core/SpecialFunctionHandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Core/SpecialFunctionHandler.cpp')
-rw-r--r--lib/Core/SpecialFunctionHandler.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Core/SpecialFunctionHandler.cpp b/lib/Core/SpecialFunctionHandler.cpp
index 3070da41..db673f15 100644
--- a/lib/Core/SpecialFunctionHandler.cpp
+++ b/lib/Core/SpecialFunctionHandler.cpp
@@ -580,8 +580,9 @@ void SpecialFunctionHandler::handleCheckMemoryAccess(ExecutionState &state,
                                      "ptr.err",
                                      executor.getAddressInfo(state, address));
     } else {
-      ref<Expr> chk = op.first->getBoundsCheckPointer(address, 
-                                                      cast<ConstantExpr>(size)->getConstantValue());
+      ref<Expr> chk = 
+        op.first->getBoundsCheckPointer(address, 
+                                        cast<ConstantExpr>(size)->getZExtValue());
       if (!chk->isTrue()) {
         executor.terminateStateOnError(state,
                                        "check_memory_access: memory error",