* Security fix.
svn path=/nixpkgs/trunk/; revision=7665
This commit is contained in:
parent
19d6b9a1a4
commit
a6338f1f34
68
pkgs/applications/video/MPlayer/asmrules-fix.patch
Normal file
68
pkgs/applications/video/MPlayer/asmrules-fix.patch
Normal file
@ -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);
|
@ -21,7 +21,7 @@ let
|
|||||||
in
|
in
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = "MPlayer-1.0rc1";
|
name = "MPlayer-1.0rc1try2";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = http://www1.mplayerhq.hu/MPlayer/releases/MPlayer-1.0rc1.tar.bz2;
|
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.
|
# Provide a reasonable standard font. Maybe we should symlink here.
|
||||||
postInstall = "cp ${freefont_ttf}/share/fonts/truetype/FreeSans.ttf $out/share/mplayer/subfont.ttf";
|
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
|
patches = [
|
||||||
# Xrandr.
|
# These fix MPlayer's aspect ratio when run in a screen rotated with
|
||||||
# See: http://itdp.de/~itdp/html/mplayer-dev-eng/2005-08/msg00427.html
|
# Xrandr.
|
||||||
patches = [./mplayer-aspect.patch ./mplayer-pivot.patch];
|
# 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 = {
|
meta = {
|
||||||
description = "A movie player that supports many video formats";
|
description = "A movie player that supports many video formats";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user