mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-11-17 10:35:10 +00:00
Fix segfault on invalid label
This commit is contained in:
parent
237fe4864b
commit
9fd4090a07
@ -72,7 +72,9 @@ struct diskio_stat *prepare_diskio_stat(const char *s)
|
||||
|
||||
char * rpbuf;
|
||||
rpbuf = realpath(&device_name[0], NULL);
|
||||
strncpy(&device_s[0], rpbuf, text_buffer_size.get(*state));
|
||||
if (rpbuf) {
|
||||
strncpy(&device_s[0], rpbuf, text_buffer_size.get(*state));
|
||||
}
|
||||
free(rpbuf);
|
||||
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user