A segmentation fault occurs when running via_regs_dump with incorrect long command options
A segmentation fault occurs when running via_regs_dump with incorrect long command options. The reproduction steps are as follows:
- git clone --branch main git://git.freedesktop.org/git/openchrome/xf86-video-openchrome
- cd xf86-video-openchrome && ./autogen.sh --enable-viaregtool && make
- ./tools/via_regs_dump --help1
The error message is as follows:
via-chrome-tool (C) 2009 by VIA Technologies, Inc. This is FREE SOFTWARE with ABSOLUTELY NO WARRANTY
Segmentation fault (core dumped)
I have attached a patch which may fix this issue. 0001-Fix-the-segmentation-fault-bug-that-occurs-when-runn.patch
Edited by jackchan-x