diff options
author | Michael Roitzsch <mroi@users.sourceforge.net> | 2004-07-22 14:29:28 +0000 |
---|---|---|
committer | Michael Roitzsch <mroi@users.sourceforge.net> | 2004-07-22 14:29:28 +0000 |
commit | d9e3ce08901c5aea4c580dfe2969c8658d5fe958 (patch) | |
tree | a7b760d0d752c836444b7ba846817d27ceccb26a | |
parent | 80e681312358422a60c9078552f8c53edf2054a1 (diff) | |
download | xine-lib-d9e3ce08901c5aea4c580dfe2969c8658d5fe958.tar.gz xine-lib-d9e3ce08901c5aea4c580dfe2969c8658d5fe958.tar.bz2 |
protect from overly long filenames
CVS patchset: 6839
CVS date: 2004/07/22 14:29:28
-rw-r--r-- | src/xine-engine/osd.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/xine-engine/osd.c b/src/xine-engine/osd.c index 876fbc9cf..a0488992f 100644 --- a/src/xine-engine/osd.c +++ b/src/xine-engine/osd.c @@ -763,10 +763,10 @@ static int osd_set_font( osd_object_t *osd, const char *fontname, int size) { /* try load font from current directory */ if (FT_New_Face(osd->ft2->library, fontname, 0, &osd->ft2->face)) { /* try load font from home directory */ - sprintf(pathname, "%s/.xine/fonts/%s", xine_get_homedir(), fontname); + snprintf(pathname, 1024, "%s/.xine/fonts/%s", xine_get_homedir(), fontname); if (FT_New_Face(osd->ft2->library, pathname, 0, &osd->ft2->face)) { /* try load font from xine font directory */ - sprintf(pathname, "%s/%s", XINE_FONTDIR, fontname); + snprintf(pathname, 1024, "%s/%s", XINE_FONTDIR, fontname); if (FT_New_Face(osd->ft2->library, pathname, 0, &osd->ft2->face)) { error_flag = 1; xprintf(this->stream->xine, XINE_VERBOSITY_LOG, @@ -1368,7 +1368,7 @@ osd_renderer_t *_x_osd_renderer_init( xine_stream_t *stream ) { osd_preload_fonts (this, XINE_FONTDIR); - sprintf (str, "%s/.xine/fonts", xine_get_homedir ()); + snprintf (str, 1024, "%s/.xine/fonts", xine_get_homedir ()); osd_preload_fonts (this, str); |