1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-11-15 17:47:09 +00:00

Merge pull request #83 from troxor/disk-by-label

Fix segfault on invalid label
This commit is contained in:
Brenden Matthews 2015-03-09 10:41:48 -07:00
commit 9c833665d8

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 {