(query.c) Use strlcpy

(font_renderer/freetype) Add Vera.ttf fallback
This commit is contained in:
twinaphex 2015-09-21 16:29:05 +02:00
parent 031190ed14
commit 951a8903c3
2 changed files with 2 additions and 1 deletions

View File

@ -209,6 +209,7 @@ static const char *font_paths[] = {
"/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf",
"/usr/share/fonts/truetype/dejavu/DejaVuSansMono.ttf",
"/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf",
"/usr/share/fonts/TTF/Vera.ttf",
#endif
"osd-font.ttf", /* Magic font to search for, useful for distribution. */
};

View File

@ -94,7 +94,7 @@ static void raise_unknown_function(off_t where, const char *name,
if (len < (MAX_ERROR_LEN - n - 3))
strncpy(tmp_error_buff + n, name, len);
strcpy(tmp_error_buff + n + len, "'");
strlcpy(tmp_error_buff + n + len, "'", sizeof(tmp_error_buff));
*error = tmp_error_buff;
}
static void raise_expected_eof(off_t where, char found, const char **error)