fenugrec / freediag

OBD2 scantool
GNU General Public License v3.0
338 stars 75 forks source link

diag_l0_*_send() ; assert if !len #68

Closed fenugrec closed 3 years ago

fenugrec commented 3 years ago

all (?) L0 drivers have something like

    if (len <= 0) {
        return diag_iseterr(DIAG_ERR_BADLEN);
    }

but len is unsigned (size_t). Anyway that should be an assert(0) unrecoverable error; L0 should never get 0-length sends.

Same idea in tty_read and tty_write

fenugrec commented 3 years ago

Once fixed, remove cppcheck suppression (see #70 )

fenugrec commented 3 years ago

Fixed via #70 .