From: Uwe Hermann Date: Thu, 19 Apr 2018 21:23:35 +0000 (+0200) Subject: session_driver: Quickfix to prevent looped analog data reads. X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=567fe53822a9b2378113a0385d32bb86f4959355;p=libsigrok.git session_driver: Quickfix to prevent looped analog data reads. A local buffer was too small, snprintf() was used to write the name of the analog-1-1-xxx ZIP archive names in that buffer. Due to the limited size, only 3 characters were usable for the last number component, i.e. the code would loop around from analog-1-1-999 to analog-1-1-100 (instead of analog-1-1-1000). As a quickfix, increase the buffer size by a large margin, a nicer fix should be used later on. --- diff --git a/src/session_driver.c b/src/session_driver.c index 27868d01..66618a1d 100644 --- a/src/session_driver.c +++ b/src/session_driver.c @@ -72,7 +72,7 @@ static gboolean stream_session_data(struct sr_dev_inst *sdi) struct sr_analog_spec spec; struct zip_stat zs; int ret, got_data; - char capturefile[16]; + char capturefile[128]; void *buf; got_data = FALSE;