ols: Fix stack clobbering at start of acquisition
This off-by-one was clobbering the stack since introduced in a803c0db4d
.
However it only set one bit, and that generally appears to have been set
already, so this rarely affected anything. But when it did, it affected
a pointer, causing a segfault.
This commit is contained in:
parent
919681f0e8
commit
2e5b73c00c
|
@ -395,7 +395,7 @@ static int hw_dev_acquisition_start(const struct sr_dev_inst *sdi,
|
|||
readcount = MIN(devc->max_samples / num_channels, devc->limit_samples) / 4;
|
||||
|
||||
memset(trigger_config, 0, 16);
|
||||
trigger_config[devc->num_stages - 1] |= 0x08;
|
||||
trigger_config[devc->num_stages] |= 0x08;
|
||||
if (devc->trigger_mask[0]) {
|
||||
delaycount = readcount * (1 - devc->capture_ratio / 100.0);
|
||||
devc->trigger_at = (readcount - delaycount) * 4 - devc->num_stages;
|
||||
|
|
Loading…
Reference in New Issue