]> git.ipfire.org Git - thirdparty/suricata.git/commit
rust: return empty slice without using from_raw_parts
authorPhilippe Antoine <pantoine@oisf.net>
Tue, 7 May 2024 08:18:14 +0000 (10:18 +0200)
committerVictor Julien <victor@inliniac.net>
Wed, 15 May 2024 15:03:50 +0000 (17:03 +0200)
commit5dc8dea8695786daec491a6655f99c0791e47f5c
tree3294f1bf2e835d295697d521be43ebcf6bcd0f51
parentedd5507ea4d59ecb743a9ee2ca7ae1376983f1bf
rust: return empty slice without using from_raw_parts

As this triggers rustc 1.78
unsafe precondition(s) violated: slice::from_raw_parts requires
the pointer to be aligned and non-null,
and the total size of the slice not to exceed `isize::MAX`

Ticket: 7013
rust/src/applayer.rs