openbsd-ports/x11/mplayer/patches/patch-libmpdemux_realrtsp_asmrp_c
robert 88d299f7f1 - Fix heap overflow in DMO loader. (CVE-2007-1246)
- regen patches while here

pulled from MPlayer SVN by Brad <brad@comstyle.com>
2007-04-13 23:13:21 +00:00

25 lines
726 B
Plaintext

$OpenBSD: patch-libmpdemux_realrtsp_asmrp_c,v 1.3 2007/04/13 23:13:21 robert Exp $
--- libmpdemux/realrtsp/asmrp.c.orig Sun Jun 11 20:35:46 2006
+++ libmpdemux/realrtsp/asmrp.c Sat Apr 14 00:35:28 2007
@@ -40,6 +40,7 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
+#include "asmrp.h"
/*
#define LOG
@@ -645,8 +646,10 @@ static int asmrp_eval (asmrp_t *p, int *
#ifdef LOG
printf ("rule #%d is true\n", rule_num);
#endif
- matches[num_matches] = rule_num;
- num_matches++;
+ if(num_matches < MAX_RULEMATCHES - 1)
+ matches[num_matches++] = rule_num;
+ else
+ printf("Ignoring matched asm rule %d, too many matched rules.\n", rule_num);
}
rule_num++;