Replace the fixed-sized buffers file_fdinfo and file_fdsymlink with dynamically allocated equivalents.
This commit is contained in:
@@ -48,8 +48,6 @@ extern "C" {
|
||||
#define PV_SIZEOF_PREVLINE_BUFFER 1024
|
||||
#define PV_FORMAT_ARRAY_MAX 100
|
||||
#define PV_SIZEOF_FORMAT_SEGMENTS_BUF 4096
|
||||
#define PV_SIZEOF_FILE_FDINFO 4096
|
||||
#define PV_SIZEOF_FILE_FDSYMLINK 4096
|
||||
#define PV_SIZEOF_FILE_FDPATH 4096
|
||||
#define PV_SIZEOF_DISPLAY_NAME 512
|
||||
|
||||
@@ -494,8 +492,8 @@ struct pvwatchfd_s {
|
||||
struct pvdisplay_s display; /* display data */
|
||||
#ifdef __APPLE__
|
||||
#else
|
||||
char file_fdinfo[PV_SIZEOF_FILE_FDINFO]; /* path to /proc fdinfo file */
|
||||
char file_fdsymlink[PV_SIZEOF_FILE_FDSYMLINK]; /* path to /proc fd symlink */
|
||||
nullable_string_ptr file_fdinfo; /* path to /proc fdinfo file */
|
||||
nullable_string_ptr file_fdsymlink; /* path to /proc fd symlink */
|
||||
#endif
|
||||
char file_fdpath[PV_SIZEOF_FILE_FDPATH]; /* path to file that was opened */
|
||||
/*@keep@ */ char display_name[PV_SIZEOF_DISPLAY_NAME]; /* name to show on progress bar */
|
||||
|
||||
Reference in New Issue
Block a user