Skip to content

Commit

Permalink
Update condition for non-zero return by strncmp
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanschmidt authored Jul 20, 2023
1 parent 9d21da4 commit 780e02a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/cdomains/arrayDomain.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1687,8 +1687,9 @@ struct
Idx.starting IInt Z.one
else
(* if first null bytes are certain, have different indexes and are before index n if n present, return integer <> 0 *)
(try if Z.equal (must_nulls_min_elt must_nulls_set1) (may_nulls_min_elt may_nulls_set1) && (not n_exists || Z.lt (must_nulls_min_elt must_nulls_set1) n)
&& Z.equal (must_nulls_min_elt must_nulls_set2) (may_nulls_min_elt may_nulls_set2) && (not n_exists || Z.lt (must_nulls_min_elt must_nulls_set2) n)
(try if Z.equal (must_nulls_min_elt must_nulls_set1) (may_nulls_min_elt may_nulls_set1)
&& Z.equal (must_nulls_min_elt must_nulls_set2) (may_nulls_min_elt may_nulls_set2)
&& (not n_exists || Z.lt (must_nulls_min_elt must_nulls_set1) n || Z.lt (must_nulls_min_elt must_nulls_set2) n )
&& not (Z.equal (must_nulls_min_elt must_nulls_set1) (must_nulls_min_elt must_nulls_set2)) then
Idx.of_excl_list IInt [Z.zero]
else
Expand Down

0 comments on commit 780e02a

Please sign in to comment.