Store name and format string in internal state as their own copies rather than pointers to strings outside the state, for memory safety and to avoid a leak on remote control.
This commit is contained in:
@@ -106,9 +106,9 @@ struct pvstate_s {
|
||||
int watch_fd; /* fd to watch */
|
||||
unsigned int width; /* screen width */
|
||||
unsigned int height; /* screen height */
|
||||
/*@null@*/ const char *name; /* display name */
|
||||
/*@null@*/ char *name; /* display name */
|
||||
char default_format[PV_SIZEOF_DEFAULT_FORMAT]; /* default format string */
|
||||
const char *format_string; /* output format string */
|
||||
char *format_string; /* output format string */
|
||||
|
||||
/******************
|
||||
* Program status *
|
||||
|
||||
Reference in New Issue
Block a user