cryptosense / ocaml-zxcvbn Goto Github PK
View Code? Open in Web Editor NEWOcaml bindings for the zxcvbn password strength estimation library
License: Other
Ocaml bindings for the zxcvbn password strength estimation library
License: Other
The following piece of code generates errors in valgrind:
let random_char () =
Char.chr (1 + Random.int 126)
let random_pass () =
String.init 10 (fun _ -> random_char ())
let check_random_pass () =
let s = random_pass () in
let (guesses, _) = Zxcvbn.matches s in
Printf.printf "%S: %f\n%!" s guesses
let () =
while true do
check_random_pass ()
done
(I can send you a PR with that as a test ~exec:false
executable if you'd like)
More precisely:
Invalid read of size 1
at 0x18455E: ZxcvbnMatch (zxcvbn.c:1635)
by 0x1829BD: zxcvbn_match_caml (zxcvbn_stubs.c:60)
by 0x142153: camlFuzz__check_random_pass_1203 (fuzz.ml:9)
by 0x1421D6: camlFuzz__entry (fuzz.ml:14)
by 0x13F838: caml_program
by 0x19D853: ???
by 0x19DBD4: caml_main (startup.c:145)
by 0x13F4CB: main (main.c:37)
Address 0x5f9434b is 0 bytes after a block of size 11 alloc'd
at 0x4C2BBEF: malloc (vg_replace_malloc.c:299)
by 0x184442: ZxcvbnMatch (zxcvbn.c:1604)
by 0x1829BD: zxcvbn_match_caml (zxcvbn_stubs.c:60)
by 0x142153: camlFuzz__check_random_pass_1203 (fuzz.ml:9)
by 0x1421D6: camlFuzz__entry (fuzz.ml:14)
by 0x13F838: caml_program
by 0x19D853: ???
by 0x19DBD4: caml_main (startup.c:145)
by 0x13F4CB: main (main.c:37)
This seems to be fixed in recent versions of zxcvbn-c
, since upgrading to master
solves this problem.
Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.