summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--include/xine.h.in3
-rw-r--r--src/demuxers/demux_ogg.c12
3 files changed, 10 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index eea983681..59046a036 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -33,7 +33,8 @@ xine-lib (1-rc3)
* detect end of real rtsp streams
* fix tvtime segfaults
* fix performance problems of RTP/UDP plugin
-
+ * fix crash with really long subtitle/language names in ogm/off files
+
xine-lib (1-rc2)
* XvMC support for hardware accelerated mpeg2 playback (-V xvmc)
* Fix some errors in sound state when exiting xine and using alsa.
diff --git a/include/xine.h.in b/include/xine.h.in
index b92a98cd9..ec85ac583 100644
--- a/include/xine.h.in
+++ b/include/xine.h.in
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: xine.h.in,v 1.108 2003/12/09 00:02:28 f1rmb Exp $
+ * $Id: xine.h.in,v 1.109 2003/12/09 23:55:11 hadess Exp $
*
* public xine-lib (libxine) interface and documentation
*
@@ -794,6 +794,7 @@ int xine_get_audio_lang (xine_stream_t *stream, int channel,
int xine_get_spu_lang (xine_stream_t *stream, int channel,
char *lang);
#define XINE_LANG_MAX 32
+#define XINE_LANG_LABEL_MAX_SIZE 128
/*
* get position / length information
diff --git a/src/demuxers/demux_ogg.c b/src/demuxers/demux_ogg.c
index daadead45..fd68d0a89 100644
--- a/src/demuxers/demux_ogg.c
+++ b/src/demuxers/demux_ogg.c
@@ -19,7 +19,7 @@
*/
/*
- * $Id: demux_ogg.c,v 1.122 2003/12/05 15:54:57 f1rmb Exp $
+ * $Id: demux_ogg.c,v 1.123 2003/12/09 23:55:11 hadess Exp $
*
* demultiplexer for ogg streams
*
@@ -615,7 +615,7 @@ static void send_ogg_buf (demux_ogg_t *this,
if (chapter >= 0) {
char t_title[256];
- sprintf(t_title, "%s / %s", this->title, this->chapter_info->entries[chapter].name);
+ snprintf(t_title, sizeof (t_title), "%s / %s", this->title, this->chapter_info->entries[chapter].name);
title = t_title;
} else {
title = this->title;
@@ -1585,10 +1585,10 @@ static int demux_ogg_get_optional_data(demux_plugin_t *this_gen,
for (stream_num=0; stream_num<this->num_streams; stream_num++) {
if (this->buf_types[stream_num]==BUF_SPU_OGM+channel) {
if (this->language[stream_num]) {
- sprintf(str, "%s", this->language[stream_num]);
+ strncpy (str, this->language[stream_num], XINE_LANG_LABEL_MAX_SIZE);
return DEMUX_OPTIONAL_SUCCESS;
} else {
- sprintf(str, "channel %d",channel);
+ snprintf(str, XINE_LANG_LABEL_MAX_SIZE, "channel %d",channel);
return DEMUX_OPTIONAL_SUCCESS;
}
}
@@ -1604,10 +1604,10 @@ static int demux_ogg_get_optional_data(demux_plugin_t *this_gen,
for (stream_num=0; stream_num<this->num_streams; stream_num++) {
if ((this->buf_types[stream_num]&0xFF00001F)==BUF_AUDIO_BASE+channel) {
if (this->language[stream_num]) {
- sprintf(str, "%s", this->language[stream_num]);
+ strncpy (str, this->language[stream_num], XINE_LANG_LABEL_MAX_SIZE);
return DEMUX_OPTIONAL_SUCCESS;
} else {
- sprintf(str, "channel %d",channel);
+ snprintf(str, XINE_LANG_LABEL_MAX_SIZE, "channel %d",channel);
return DEMUX_OPTIONAL_SUCCESS;
}
}