summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Roitzsch <mroi@users.sourceforge.net>2004-07-22 14:26:24 +0000
committerMichael Roitzsch <mroi@users.sourceforge.net>2004-07-22 14:26:24 +0000
commit2681262ab242eda636927f45ac1195da5215157e (patch)
tree84ab408d0c3c9251e0b0298c7193fc75640ce13b
parenta2d2e70220bbb021fe17ea17f3e3f2d7a8077ebd (diff)
downloadxine-lib-2681262ab242eda636927f45ac1195da5215157e.tar.gz
xine-lib-2681262ab242eda636927f45ac1195da5215157e.tar.bz2
frontends could have crashed xine-lib by passing a too long filename
CVS patchset: 6837 CVS date: 2004/07/22 14:26:24
-rw-r--r--src/xine-engine/configfile.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/xine-engine/configfile.c b/src/xine-engine/configfile.c
index 18cba33cf..f6460f28f 100644
--- a/src/xine-engine/configfile.c
+++ b/src/xine-engine/configfile.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: configfile.c,v 1.66 2004/06/19 19:54:59 mroi Exp $
+ * $Id: configfile.c,v 1.67 2004/07/22 14:26:24 mroi Exp $
*
* config object (was: file) management - implementation
*
@@ -736,7 +736,7 @@ void xine_config_save (xine_t *xine, const char *filename) {
struct stat backup_stat, config_stat;
FILE *f_config, *f_backup;
- sprintf(temp, "%s~", filename);
+ snprintf(temp, XINE_PATH_MAX, "%s~", filename);
unlink (temp);
if (stat(temp, &backup_stat) != 0) {