Skip to content

Commit

Permalink
Also see what happens if we pass null
Browse files Browse the repository at this point in the history
  • Loading branch information
hansott committed Jan 27, 2025
1 parent 0a1fb3c commit e5bfe3a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions smoketests/ffi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ assertEquals(
lib.symbols.detect_sql_injection(Deno.UnsafePointer.of(new Uint8Array([])), toCString("🔥"), 0),
2
);
assertEquals(
lib.symbols.detect_sql_injection(null, toCString("🔥"), 0),
2
);

// Test JS injection
assertEquals(
Expand All @@ -75,5 +79,9 @@ assertEquals(
lib.symbols.detect_js_injection(Deno.UnsafePointer.of(new Uint8Array([])), toCString("🔥"), 0),
2
);
assertEquals(
lib.symbols.detect_js_injection(null, toCString("🔥"), 0),
2
);

lib.close();

0 comments on commit e5bfe3a

Please sign in to comment.