Fix Autotokens (#706)

* fix

* del
This commit is contained in:
Dongjia Zhang 2022-07-20 21:01:11 +02:00 committed by GitHub
parent 8899a3b01c
commit 667adf97ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -46,9 +46,7 @@ pub use __afl_area_ptr as EDGES_MAP_PTR;
pub fn autotokens() -> Result<Tokens, Error> {
unsafe {
if __token_start.is_null() || __token_stop.is_null() {
Err(Error::illegal_state(
"AutoTokens section not found, likely the target is not compiled with AutoTokens",
))
Ok(Tokens::default())
} else {
// we can safely unwrap
Tokens::from_ptrs(__token_start, __token_stop)