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.
This commit is contained in:
Uwe Hermann 2018-04-19 23:23:35 +02:00
parent 2003be8cec
commit 567fe53822
1 changed files with 1 additions and 1 deletions

View File

@ -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;