facebook / facebook/flow

Octal and binary numbers > 2^63-1 crash the parser

Aperta
#3,674 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Accepting PRs Crash Effort: easy parsing
Lingua principale
Rust
Stelle
22.3k
Fork
1.9k
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

we're using `Int64.of_string` to parse octal and binary numbers (e.g. `0o1234` or `0b10101`). `Int64.of_string` throws when called with a number larger than `Int64.max_int` (2^63-1).

Instead, I think we can just use `string_of_float`. It seems to support `0b` and `0o`.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.