1
0
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:
Troy C 2015-02-28 23:03:37 -06:00
parent 237fe4864b
commit 9fd4090a07

View File

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