$OpenBSD: patch-src_input_libreal_real_c,v 1.4 2007/01/02 19:42:59 robert Exp $
--- src/input/libreal/real.c.orig	Sun Jul  9 10:37:40 2006
+++ src/input/libreal/real.c	Mon Jan  1 15:28:07 2007
@@ -51,9 +51,10 @@ static const unsigned char xor_table[] =
 #define BE_32C(x,y) do { *(uint32_t *)(x) = be2me_32((y)); } while(0)
 #define LE_32C(x,y) do { *(uint32_t *)(x) = le2me_32((y)); } while(0)
 
+#ifndef MAX
 #define MAX(x,y) ((x>y) ? x : y)
+#endif
 
-
 static void hash(char *field, char *param) {
 
   uint32_t a, b, c, d;
@@ -472,11 +473,11 @@ rmff_header_t *real_parse_sdp(char *data
     int j=0;
     int n;
     char b[64];
-    int rulematches[16];
+    int rulematches[MAX_RULEMATCHES];
 
     lprintf("calling asmrp_match with:\n%s\n%u\n", desc->stream[i]->asm_rule_book, bandwidth);
 
-    n=asmrp_match(desc->stream[i]->asm_rule_book, bandwidth, rulematches);
+    n=asmrp_match(desc->stream[i]->asm_rule_book, bandwidth, rulematches, sizeof(rulematches)/sizeof(rulematches[0]));
     for (j=0; j<n; j++) {
       lprintf("asmrp rule match: %u for stream %u\n", rulematches[j], desc->stream[i]->stream_id);
       sprintf(b,"stream=%u;rule=%u,", desc->stream[i]->stream_id, rulematches[j]);
