Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions CodeHawk/CHB/bchlib/bCHMemoryReference.ml
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ and get_field_memory_offset_at
Error [__FILE__ ^ ":" ^ (string_of_int __LINE__) ^ ": "
^ "Skipped over field: "
^ (string_of_int offset)]
else if offset > (foff + sz) then
else if offset >= (foff + sz) then
Ok None
else
let offset = offset - foff in
Expand Down Expand Up @@ -369,7 +369,9 @@ and get_field_memory_offset_at
Error [__FILE__ ^ ":" ^ (string_of_int __LINE__) ^ ": "
^ "Nonzero offset: " ^ (string_of_int offset)
^ " with unstructured field type: "
^ (btype_to_string fldtype)])
^ (btype_to_string fldtype)
^ " for field "
^ finfo.bfname])
(resolve_type finfo.bftype)) (Ok None) finfos in
(match optfield_r with
| Error e -> Error e
Expand Down
4 changes: 4 additions & 0 deletions CodeHawk/CHB/bchlib/bCHVariable.ml
Original file line number Diff line number Diff line change
Expand Up @@ -832,6 +832,10 @@ object (self)
(cv1: constant_value_variable_t)
(cv2: constant_value_variable_t) =
match (cv1, cv2) with
| (TypeCastValue _, TypeCastValue _) -> Stdlib.compare ix1 ix2
| (TypeCastValue _, _) -> -1
| (_, TypeCastValue _) -> 1

| (FunctionReturnValue _, FunctionReturnValue _) -> Stdlib.compare ix1 ix2
| (FunctionReturnValue _, _) -> -1
| (_, FunctionReturnValue _) -> 1
Expand Down