Skip to content
Snippets Groups Projects
Commit 8c43408a authored by Daniel Agar's avatar Daniel Agar
Browse files

pwm_out_sim PWM_SERVO_SET_MAX_PWM fix index check

 - fixes coverity CID 264263
parent 0ef5d892
No related branches found
No related tags found
No related merge requests found
...@@ -367,8 +367,7 @@ PWMSim::ioctl(device::file_t *filp, int cmd, unsigned long arg) ...@@ -367,8 +367,7 @@ PWMSim::ioctl(device::file_t *filp, int cmd, unsigned long arg)
struct pwm_output_values *pwm = (struct pwm_output_values *)arg; struct pwm_output_values *pwm = (struct pwm_output_values *)arg;
for (unsigned i = 0; i < pwm->channel_count; i++) { for (unsigned i = 0; i < pwm->channel_count; i++) {
if (i < MAX_ACTUATORS) {
if (i <= MAX_ACTUATORS) {
_pwm_max[i] = pwm->values[i]; _pwm_max[i] = pwm->values[i];
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment