summary refs log tree commit diff
path: root/pkgs/applications
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2007-01-14 18:25:26 +0000
committerEelco Dolstra <eelco.dolstra@logicblox.com>2007-01-14 18:25:26 +0000
commita6338f1f34fd6e458e7283a9639573efe1942477 (patch)
tree0e6c31fe5520554a6dc91f4aa5778935c2d30d41 /pkgs/applications
parent19d6b9a1a494e78a9e6b61855f2c3fa81528d267 (diff)
downloadnixlib-a6338f1f34fd6e458e7283a9639573efe1942477.tar
nixlib-a6338f1f34fd6e458e7283a9639573efe1942477.tar.gz
nixlib-a6338f1f34fd6e458e7283a9639573efe1942477.tar.bz2
nixlib-a6338f1f34fd6e458e7283a9639573efe1942477.tar.lz
nixlib-a6338f1f34fd6e458e7283a9639573efe1942477.tar.xz
nixlib-a6338f1f34fd6e458e7283a9639573efe1942477.tar.zst
nixlib-a6338f1f34fd6e458e7283a9639573efe1942477.zip
* Security fix.
svn path=/nixpkgs/trunk/; revision=7665
Diffstat (limited to 'pkgs/applications')
-rw-r--r--pkgs/applications/video/MPlayer/asmrules-fix.patch68
-rw-r--r--pkgs/applications/video/MPlayer/default.nix16
2 files changed, 79 insertions, 5 deletions
diff --git a/pkgs/applications/video/MPlayer/asmrules-fix.patch b/pkgs/applications/video/MPlayer/asmrules-fix.patch
new file mode 100644
index 000000000000..efdfe6b307dd
--- /dev/null
+++ b/pkgs/applications/video/MPlayer/asmrules-fix.patch
@@ -0,0 +1,68 @@
+diff -rc MPlayer-1.0rc1-orig/stream/realrtsp/asmrp.c MPlayer-1.0rc1/stream/realrtsp/asmrp.c
+*** MPlayer-1.0rc1-orig/stream/realrtsp/asmrp.c	2006-10-23 00:32:25.000000000 +0200
+--- MPlayer-1.0rc1/stream/realrtsp/asmrp.c	2007-01-14 19:11:06.000000000 +0100
+***************
+*** 40,45 ****
+--- 40,46 ----
+  #include <stdlib.h>
+  #include <stdio.h>
+  #include <string.h>
++ #include "asmrp.h"
+  
+  /*
+  #define LOG
+***************
+*** 645,652 ****
+  #ifdef LOG
+        printf ("rule #%d is true\n", rule_num);
+  #endif
+!       matches[num_matches] = rule_num;
+!       num_matches++;
+      }
+  
+      rule_num++;
+--- 646,655 ----
+  #ifdef LOG
+        printf ("rule #%d is true\n", rule_num);
+  #endif
+!       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++;
+diff -rc MPlayer-1.0rc1-orig/stream/realrtsp/asmrp.h MPlayer-1.0rc1/stream/realrtsp/asmrp.h
+*** MPlayer-1.0rc1-orig/stream/realrtsp/asmrp.h	2006-10-23 00:32:25.000000000 +0200
+--- MPlayer-1.0rc1/stream/realrtsp/asmrp.h	2007-01-14 19:11:06.000000000 +0100
+***************
+*** 40,45 ****
+--- 40,47 ----
+  #ifndef HAVE_ASMRP_H
+  #define HAVE_ASMRP_H
+  
++ #define MAX_RULEMATCHES 16
++ 
+  int asmrp_match (const char *rules, int bandwidth, int *matches) ;
+  
+  #endif
+diff -rc MPlayer-1.0rc1-orig/stream/realrtsp/real.c MPlayer-1.0rc1/stream/realrtsp/real.c
+*** MPlayer-1.0rc1-orig/stream/realrtsp/real.c	2006-10-23 00:32:25.000000000 +0200
+--- MPlayer-1.0rc1/stream/realrtsp/real.c	2007-01-14 19:11:06.000000000 +0100
+***************
+*** 271,277 ****
+      int j=0;
+      int n;
+      char b[64];
+!     int rulematches[16];
+  
+  #ifdef LOG
+      printf("calling asmrp_match with:\n%s\n%u\n", desc->stream[i]->asm_rule_book, bandwidth);
+--- 271,277 ----
+      int j=0;
+      int n;
+      char b[64];
+!     int rulematches[MAX_RULEMATCHES];
+  
+  #ifdef LOG
+      printf("calling asmrp_match with:\n%s\n%u\n", desc->stream[i]->asm_rule_book, bandwidth);
diff --git a/pkgs/applications/video/MPlayer/default.nix b/pkgs/applications/video/MPlayer/default.nix
index 225b0669696b..acc4ab59d970 100644
--- a/pkgs/applications/video/MPlayer/default.nix
+++ b/pkgs/applications/video/MPlayer/default.nix
@@ -21,7 +21,7 @@ let
 in
 
 stdenv.mkDerivation {
-  name = "MPlayer-1.0rc1";
+  name = "MPlayer-1.0rc1try2";
 
   src = fetchurl {
     url = http://www1.mplayerhq.hu/MPlayer/releases/MPlayer-1.0rc1.tar.bz2;
@@ -50,10 +50,16 @@ stdenv.mkDerivation {
   # Provide a reasonable standard font.  Maybe we should symlink here.
   postInstall = "cp ${freefont_ttf}/share/fonts/truetype/FreeSans.ttf $out/share/mplayer/subfont.ttf";
 
-  # These fix MPlayer's aspect ratio when run in a screen rotated with
-  # Xrandr.
-  # See: http://itdp.de/~itdp/html/mplayer-dev-eng/2005-08/msg00427.html
-  patches = [./mplayer-aspect.patch ./mplayer-pivot.patch];
+  patches = [
+    # These fix MPlayer's aspect ratio when run in a screen rotated with
+    # Xrandr.
+    # See: http://itdp.de/~itdp/html/mplayer-dev-eng/2005-08/msg00427.html
+    ./mplayer-aspect.patch
+    ./mplayer-pivot.patch
+
+    # Security fix.
+    ./asmrules-fix.patch
+  ];
 
   meta = {
     description = "A movie player that supports many video formats";