Re: [PATCH libdrm 1/2] modetest: Fix segmentation fault

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2019-07-22 at 13:08 -0300, Ezequiel Garcia wrote:
> When a mode is set with just a connector "-s foo",
> we get a nasty segmentation fault. Fix it.
> 
> Signed-off-by: Ezequiel Garcia <ezequiel@xxxxxxxxxxxxx>

There's no rush, but still, here goes a reminder
of this and the next patch. :-)

> ---
>  tests/modetest/modetest.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/tests/modetest/modetest.c b/tests/modetest/modetest.c
> index e66be6607e00..5e628127a130 100644
> --- a/tests/modetest/modetest.c
> +++ b/tests/modetest/modetest.c
> @@ -1695,6 +1695,8 @@ static int parse_connector(struct pipe_arg *pipe, const char *arg)
>  		return -1;
>  
>  	/* Parse the remaining parameters. */
> +	if (!endp)
> +		return -1;
>  	if (*endp == '@') {
>  		arg = endp + 1;
>  		pipe->crtc_id = strtoul(arg, &endp, 10);


_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux