summaryrefslogtreecommitdiff
path: root/src/libreal/audio_decoder.c
diff options
context:
space:
mode:
authorMichael Roitzsch <mroi@users.sourceforge.net>2004-07-25 17:44:10 +0000
committerMichael Roitzsch <mroi@users.sourceforge.net>2004-07-25 17:44:10 +0000
commitd85f5071c05e6fe1b92fdf4003c3e25203c14a7a (patch)
treecb697d615275ac8375b2881b56a1e9d531a115a1 /src/libreal/audio_decoder.c
parentbee1211f44cf805a97beb1d5cdbf64c2dfa0585f (diff)
downloadxine-lib-d85f5071c05e6fe1b92fdf4003c3e25203c14a7a.tar.gz
xine-lib-d85f5071c05e6fe1b92fdf4003c3e25203c14a7a.tar.bz2
protect buffer; a long configured codec path could have overflown it
CVS patchset: 6852 CVS date: 2004/07/25 17:44:10
Diffstat (limited to 'src/libreal/audio_decoder.c')
-rw-r--r--src/libreal/audio_decoder.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libreal/audio_decoder.c b/src/libreal/audio_decoder.c
index d213af8b4..21a361e68 100644
--- a/src/libreal/audio_decoder.c
+++ b/src/libreal/audio_decoder.c
@@ -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: audio_decoder.c,v 1.38 2004/04/26 17:50:07 mroi Exp $
+ * $Id: audio_decoder.c,v 1.39 2004/07/25 17:44:10 mroi Exp $
*
* thin layer to use real binary-only codecs in xine
*
@@ -124,7 +124,7 @@ static int load_syms_linux (realdec_decoder_t *this, char *codec_name) {
this->stream->xine->config, "codec.real_codecs_path");
char path[1024];
- sprintf (path, "%s/%s", entry->str_value, codec_name);
+ snprintf (path, sizeof(path), "%s/%s", entry->str_value, codec_name);
lprintf ("(audio) opening shared obj '%s'\n", path);
@@ -160,7 +160,7 @@ static int load_syms_linux (realdec_decoder_t *this, char *codec_name) {
char path[1024];
- sprintf(path, "DT_Codecs=%s", entry->str_value);
+ snprintf(path, sizeof(path) - 1, "DT_Codecs=%s", entry->str_value);
if (path[strlen(path)-1]!='/'){
path[strlen(path)+1]=0;
path[strlen(path)]='/';