pc/serial_unix: bump device path buffer size to 4096 bytes

Since dp->d_name can be up to 255 bytes long and the 'name' buffer variable is
is a superset of it, bump the size of the latter to 4096 bytes (correspoding
to PATH_MAX on Linux systems).
This commit is contained in:
Francesco Valla 2020-04-03 10:50:48 +02:00 committed by UweBonnes
parent b4ab9f328e
commit 8a9980cd06
1 changed files with 1 additions and 2 deletions

View File

@ -71,7 +71,7 @@ static int set_interface_attribs(void)
#define DEVICE_BY_ID "/dev/serial/by-id/"
int serial_open(BMP_CL_OPTIONS_t *opt)
{
char name[256];
char name[4096];
if (!opt->opt_device) {
/* Try to find some BMP if0*/
struct dirent *dp;
@ -212,4 +212,3 @@ int platform_buffer_read(uint8_t *data, int maxsize)
exit(-3);
return 0;
}