diff options
author | Diego 'Flameeyes' Pettenò <flameeyes@gmail.com> | 2008-05-07 18:06:56 +0200 |
---|---|---|
committer | Diego 'Flameeyes' Pettenò <flameeyes@gmail.com> | 2008-05-07 18:06:56 +0200 |
commit | bbb2643bdcc8fb3d7f29c11e1344286b042535bf (patch) | |
tree | 874f8a93f6afe13af796073c92a46dee774c946f /src/input/input_dvb.c | |
parent | 837822b5c6924be7fbc297bcef9639d7ada95a30 (diff) | |
download | xine-lib-bbb2643bdcc8fb3d7f29c11e1344286b042535bf.tar.gz xine-lib-bbb2643bdcc8fb3d7f29c11e1344286b042535bf.tar.bz2 |
Use proper string functions in place of sn?printf.
Instead of calling sprintf or snprintf with a "%s" format string, use
the proper strcpy, strncpy, strdup or strndup function.
Diffstat (limited to 'src/input/input_dvb.c')
-rw-r--r-- | src/input/input_dvb.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/input/input_dvb.c b/src/input/input_dvb.c index 0ec81026b..bccbc13be 100644 --- a/src/input/input_dvb.c +++ b/src/input/input_dvb.c @@ -1839,8 +1839,7 @@ static void show_program_info(int x, int y, int max_x, int max_y, int* last_y, /*Content type and rating, if any. */ if (strlen(epg_data->content) > 3) { - - snprintf(buffer, 94, "%s", epg_data->content); + strncpy(buffer, epg_data->content, 94-1); prog_rating = epg_data->rating; if (prog_rating > 0) { @@ -1870,7 +1869,7 @@ static void show_program_info(int x, int y, int max_x, int max_y, int* last_y, /* Print the description. */ if (epg_data->description && strlen(epg_data->description) > 0) { renderer->set_font(osd, "sans", EPG_DESCRIPTION_FONT_SIZE); - sprintf(buffer, "%s", epg_data->description); + strcpy(buffer, epg_data->description); /* If the description is not complete (i.e., there is no comma at the end), add "..." to the end. In my locale they often seem to send incomplete description texts :( */ |