ITADN

Segmentation fault when calling function `scr_restore`

#222Closedcicilzx 创建于 2024-09-16
C
cicilzxcommented
Hi, I'm developing a fuzzer to test the safe abstraction, and I fonnd a segmentation fault when calling function `scr_restore`. Below are two inputs that can trigger the segmentation fault. I think is because missing the pre-condition or post-condition checking when calling the unsafe function `ll::scr_restore`. Input-1: ```rust use ncurses::scr_restore; fn main() { let filename = "."; let _ = scr_restore(filename); } ``` Input-2: ```rust use ncurses::scr_restore; fn main() { let filename = "/"; let _ = scr_restore(filename); } ``` The output is: ```sh zsh: segmentation fault cargo run ```
关闭于 2024-10-07 5 条评论