]> sigrok.org Git - libsigrok.git/commit
output/csv: fix out-of-bounds array access in process_analog()
authorGerhard Sittig <redacted>
Sun, 4 Mar 2018 18:12:29 +0000 (19:12 +0100)
committerUwe Hermann <redacted>
Mon, 12 Mar 2018 14:55:22 +0000 (15:55 +0100)
commit823b0e29ae8e61c98ed9cd096c9d42a008659a7d
tree072e21e2a879a3ad022556516be33f2a729a82be
parenta551cb0927db34bf83fcb2c71023fe4df08a22b6
output/csv: fix out-of-bounds array access in process_analog()

Make sure to not exceed the ctx->analog_samples[] array bounds. Don't
use the (huge) channel's index in the device's(!) channel list, instead
use the zero-based and dense index into the array of analog samples in
the accumulation buffer, before writing to the external file.

This fixes the segfault reported in bug #1124.
src/output/csv.c