Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change magic number for fingerprint files #176

Open
wants to merge 2 commits into
base: updated_enabled_cdot
Choose a base branch
from
Open
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
8 changes: 4 additions & 4 deletions src/backend/fpfile.ml
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ module V13 = struct
(* The key is the MD5 converted to hex. *)

(* File format:
- magic number as a marshalled integer = 20101013
- magic number as a marshalled integer = 20241112
- Fpver13 of tbl
- any number of (Digest.t, sti list) pairs
*)
Expand All @@ -153,8 +153,8 @@ open V13

let fptbl = ref (Hashtbl.create 500 : V13.tbl)

let old_magic_number = 20101013
let magic_number = 20210223
let old_magic_numbers = [20101013; 20210223]
let magic_number = 20241112

let write_fp_table oc =
output_value oc magic_number;
Expand Down Expand Up @@ -568,7 +568,7 @@ let load_fingerprints_aux file =
if Sys.file_exists file then begin
let ic = open_in_bin file in
let magic = Marshal.from_channel ic in
if magic = old_magic_number then
if List.mem magic old_magic_numbers then
raise(FpFileOlderMagicNumber);
if magic <> magic_number then raise(FpFileCorrupted);
let v = Marshal.from_channel ic in
Expand Down