diff --git a/src/drivers/dshot/dshot.cpp b/src/drivers/dshot/dshot.cpp index a2ed82c3c4..de6af99301 100644 --- a/src/drivers/dshot/dshot.cpp +++ b/src/drivers/dshot/dshot.cpp @@ -1070,7 +1070,7 @@ DShotOutput::pwm_ioctl(file *filp, int cmd, unsigned long arg) case MIXERIOCLOADBUF: { const char *buf = (const char *)arg; - unsigned buflen = strnlen(buf, 1024); + unsigned buflen = strlen(buf); ret = _mixing_output.loadMixerThreadSafe(buf, buflen); break; diff --git a/src/drivers/mkblctrl/mkblctrl.cpp b/src/drivers/mkblctrl/mkblctrl.cpp index 9c40ac7425..d6552332b2 100644 --- a/src/drivers/mkblctrl/mkblctrl.cpp +++ b/src/drivers/mkblctrl/mkblctrl.cpp @@ -1052,7 +1052,7 @@ MK::pwm_ioctl(file *filp, int cmd, unsigned long arg) case MIXERIOCLOADBUF: { const char *buf = (const char *)arg; - unsigned buflen = strnlen(buf, 1024); + unsigned buflen = strlen(buf); if (_mixers == nullptr) { _mixers = new MixerGroup(control_callback, (uintptr_t)&_controls); diff --git a/src/drivers/pwm_out_sim/PWMSim.cpp b/src/drivers/pwm_out_sim/PWMSim.cpp index 4f3e46d8a2..3008a9ac5e 100644 --- a/src/drivers/pwm_out_sim/PWMSim.cpp +++ b/src/drivers/pwm_out_sim/PWMSim.cpp @@ -219,7 +219,7 @@ PWMSim::ioctl(device::file_t *filp, int cmd, unsigned long arg) case MIXERIOCLOADBUF: { const char *buf = (const char *)arg; - unsigned buflen = strnlen(buf, 1024); + unsigned buflen = strlen(buf); ret = _mixing_output.loadMixerThreadSafe(buf, buflen); break; } diff --git a/src/drivers/px4fmu/fmu.cpp b/src/drivers/px4fmu/fmu.cpp index 398e325559..4b347b33ac 100644 --- a/src/drivers/px4fmu/fmu.cpp +++ b/src/drivers/px4fmu/fmu.cpp @@ -1470,7 +1470,7 @@ PX4FMU::pwm_ioctl(file *filp, int cmd, unsigned long arg) case MIXERIOCLOADBUF: { const char *buf = (const char *)arg; - unsigned buflen = strnlen(buf, 1024); + unsigned buflen = strlen(buf); ret = _mixing_output.loadMixerThreadSafe(buf, buflen); update_pwm_trims(); diff --git a/src/drivers/px4io/px4io.cpp b/src/drivers/px4io/px4io.cpp index dc311506cf..4a6dae2498 100644 --- a/src/drivers/px4io/px4io.cpp +++ b/src/drivers/px4io/px4io.cpp @@ -2704,7 +2704,7 @@ PX4IO::ioctl(file *filep, int cmd, unsigned long arg) case MIXERIOCLOADBUF: { const char *buf = (const char *)arg; - ret = mixer_send(buf, strnlen(buf, 2048)); + ret = mixer_send(buf, strlen(buf)); break; } diff --git a/src/drivers/uavcan/uavcan_main.cpp b/src/drivers/uavcan/uavcan_main.cpp index 6297468f56..f3ca901185 100644 --- a/src/drivers/uavcan/uavcan_main.cpp +++ b/src/drivers/uavcan/uavcan_main.cpp @@ -1099,7 +1099,7 @@ UavcanNode::ioctl(file *filp, int cmd, unsigned long arg) case MIXERIOCLOADBUF: { const char *buf = (const char *)arg; - unsigned buflen = strnlen(buf, 1024); + unsigned buflen = strlen(buf); if (_mixers == nullptr) { _mixers = new MixerGroup(control_callback, (uintptr_t)_controls);