changeset 12288:8c8c71a02e5a

fix exploitable buffer overflow
author rfelker
date Mon, 26 Apr 2004 09:22:17 +0000
parents 98225ad57fc2
children e197979a0883
files libmpdemux/demux_mkv.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/demux_mkv.c	Mon Apr 26 08:59:49 2004 +0000
+++ b/libmpdemux/demux_mkv.c	Mon Apr 26 09:22:17 2004 +0000
@@ -1306,11 +1306,11 @@
           break;
         case MATROSKA_TRACK_AUDIO:
           type = "audio";
-          sprintf (str, "-aid %u, -alang %s",aid++,mkv_d->tracks[i]->language);
+          sprintf (str, "-aid %u, -alang %.5s",aid++,mkv_d->tracks[i]->language);
           break;
         case MATROSKA_TRACK_SUBTITLE:
           type = "sutitles";
-          sprintf (str, "-sid %u, -slang %s",sid++,mkv_d->tracks[i]->language);
+          sprintf (str, "-sid %u, -slang %.5s",sid++,mkv_d->tracks[i]->language);
           break;
         }
       mp_msg(MSGT_DEMUX, MSGL_INFO, "[mkv] Track ID %u: %s (%s), %s\n",