From 6c4b6988db55eae5f5d7c9c1875360fa0a1d2e2c Mon Sep 17 00:00:00 2001 From: Wout Feys Date: Fri, 20 Sep 2024 10:48:33 +0200 Subject: [PATCH] Clarify return statement for detect_shell_injection --- src/ffi_bindings/mod.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/ffi_bindings/mod.rs b/src/ffi_bindings/mod.rs index f20cb89..4ede3f5 100644 --- a/src/ffi_bindings/mod.rs +++ b/src/ffi_bindings/mod.rs @@ -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 }