Skip to content

Commit

Permalink
strcasecmp and friend
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-schwarz committed Oct 1, 2023
1 parent 6489d8c commit 53a8aae
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/analyses/libraryFunctions.ml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ let c_descs_list: (string * LibraryDesc.t) list = LibraryDsl.[
("strncmp", special [__ "s1" [r]; __ "s2" [r]; __ "n" []] @@ fun s1 s2 n -> Strcmp { s1; s2; n = Some n; });
("strchr", unknown [drop "s" [r]; drop "c" []]);
("strrchr", unknown [drop "s" [r]; drop "c" []]);
("strcasecmp", unknown [drop "s1" [r]; drop "s2" [r]]);
("strncasecmp", unknown [drop "s1" [r]; drop "s2" [r]; drop "n" []]);
("malloc", special [__ "size" []] @@ fun size -> Malloc size);
("calloc", special [__ "n" []; __ "size" []] @@ fun n size -> Calloc {count = n; size});
("realloc", special [__ "ptr" [r; f]; __ "size" []] @@ fun ptr size -> Realloc { ptr; size });
Expand Down Expand Up @@ -1116,7 +1118,6 @@ let invalidate_actions = [
"dup", readsAll; (*safe*)
"__builtin___vsnprintf", writesAllButFirst 3 readsAll; (*drop 3*)
"__builtin___vsnprintf_chk", writesAllButFirst 3 readsAll; (*drop 3*)
"strcasecmp", readsAll; (*safe*)
"__error", readsAll; (*safe*)
"__maskrune", writesAll; (*unsafe*)
"inet_addr", readsAll; (*safe*)
Expand Down

0 comments on commit 53a8aae

Please sign in to comment.