1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-11-17 18:45:10 +00:00

Fix segfault in to_real_path

This commit is contained in:
Nikolas Garofil 2009-06-29 16:04:00 +02:00
parent 775d591a68
commit c84d9f8b26
2 changed files with 5 additions and 1 deletions

View File

@ -1,3 +1,7 @@
2009-06-29
* Fix segfault in to_real_path, it's sometimes called with the same
source and dest without checking the length, causing a segfault.
2009-06-20
* Use the internal process list for if_running on Linux

View File

@ -93,7 +93,7 @@ void to_real_path(char *dest, const char *source)
ERR("$HOME environment variable doesn't exist");
strncpy(dest, source, DEFAULT_TEXT_BUFFER_SIZE);
}
} else {
} else if (dest != source) { //see changelog 2009-06-29 if you doubt that this check is necessary
strncpy(dest, source, DEFAULT_TEXT_BUFFER_SIZE);
}
}