Skip to content

Commit

Permalink
Clarify return statement for detect_shell_injection
Browse files Browse the repository at this point in the history
  • Loading branch information
Wout Feys committed Sep 20, 2024
1 parent 794722e commit 6c4b698
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/ffi_bindings/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,11 @@ pub extern "C" fn detect_shell_injection(

let command_str = str::from_utf8(command_bytes).unwrap();
let userinput_str = str::from_utf8(userinput_bytes).unwrap();

// Returns an integer value, representing a boolean (1 = true, 0 = false).
if detect_shell_injection_stringified(command_str, userinput_str) {
return 1;
1
} else {
0
}
0
}

0 comments on commit 6c4b698

Please sign in to comment.