Skip to content

Commit

Permalink
Remove duplicate vsprintf and add vsnprintf
Browse files Browse the repository at this point in the history
  • Loading branch information
karoliineh committed Sep 18, 2023
1 parent a365729 commit 4444284
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/analyses/libraryFunctions.ml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ let c_descs_list: (string * LibraryDesc.t) list = LibraryDsl.[
("vfprintf", unknown [drop "stream" [r_deep; w_deep]; drop "format" [r]; drop "vlist" [r_deep]]); (* TODO: what to do with a va_list type? is r_deep correct? *)
("vsprintf", unknown [drop "buffer" [w]; drop "format" [r]; drop "vlist" [r_deep]]); (* TODO: what to do with a va_list type? is r_deep correct? *)
("vasprintf", unknown [drop "strp" [w]; drop "format" [r]; drop "ap" [r_deep]]); (* TODO: what to do with a va_list type? is r_deep correct? *)
("vsprintf", unknown [drop "str" [w]; drop "format" [r]; drop "ap" [r_deep]]); (* TODO: what to do with a va_list type? is r_deep correct? *)
("vsnprintf", unknown [drop "str" [w]; drop "size" []; drop "format" [r]; drop "ap" [r_deep]]); (* TODO: what to do with a va_list type? is r_deep correct? *)
("mktime", unknown [drop "tm" [r;w]]);
("ctime", unknown ~attrs:[ThreadUnsafe] [drop "rm" [r]]);
("clearerr", unknown [drop "stream" [w]]);
Expand Down Expand Up @@ -1089,7 +1089,6 @@ let invalidate_actions = [
"usleep", readsAll;
"svc_run", writesAll;(*unsafe*)
"dup", readsAll; (*safe*)
"vsnprintf", writesAllButFirst 3 readsAll; (*drop 3*)
"__builtin___vsnprintf", writesAllButFirst 3 readsAll; (*drop 3*)
"__builtin___vsnprintf_chk", writesAllButFirst 3 readsAll; (*drop 3*)
"strcasecmp", readsAll; (*safe*)
Expand Down

0 comments on commit 4444284

Please sign in to comment.