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

fixed crash on realloc due to use of strncpy

git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@1111 7f574dfc-610e-0410-a909-a81674777703
This commit is contained in:
Brenden Matthews 2008-04-22 21:54:49 +00:00
parent 1dafa537d4
commit 5c01c5991e

View File

@ -218,7 +218,7 @@ int addfont(const char *data_in)
}
// must account for null terminator
if (strlen(data_in) < DEFAULT_TEXT_BUFFER_SIZE) {
strncpy(fonts[font_count].name, data_in, text_buffer_size);
strncpy(fonts[font_count].name, data_in, DEFAULT_TEXT_BUFFER_SIZE);
#ifdef XFT
fonts[font_count].font_alpha = 0xffff;
#endif