From a55daf0b6c2930660499e40a455bd1011f44f1eb Mon Sep 17 00:00:00 2001 From: Christian Franke Date: Fri, 14 Oct 2016 01:54:51 +0200 Subject: Fix crash in ttydmx.c --- cethcan/ttydmx.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cethcan/ttydmx.c b/cethcan/ttydmx.c index 45d8b5b..f07ce38 100644 --- a/cethcan/ttydmx.c +++ b/cethcan/ttydmx.c @@ -256,6 +256,8 @@ int ttydmx_init_conf(json_t *config) serial.flags &= ~ASYNC_SPD_MASK; serial.flags |= ASYNC_SPD_CUST; serial.custom_divisor = serial.baud_base / 250000; + if (!serial.custom_divisor) + goto out_setup_err; if (ioctl(sink->fd, TIOCSSERIAL, &serial)) goto out_setup_err; -- cgit v1.2.1