yaml/yaml.patch

Fri, 03 Aug 2012 20:11:53 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Fri, 03 Aug 2012 20:11:53 +0200
changeset 470
f8813e60f168
child 591
f65313225f8a
permissions
-rw-r--r--

Neutralize buggy code causing OpenPKG to have 'fatal problems' in
spite of correct installation, configuration, and operation. An
administrator suffering from this failure is even unable to
uninstall the flawed software.

     1 Index: YAML-AppConfig-0.16/Makefile.PL
     2 --- YAML-AppConfig-0.16/Makefile.PL.orig	2006-07-02 23:21:51 +0200
     3 +++ YAML-AppConfig-0.16/Makefile.PL	2009-11-27 13:24:07 +0100
     4 @@ -21,6 +21,7 @@
     5          eval "require $info->[0]; 0;";
     6          push @yamls, @$info unless $@;
     7      }
     8 -    die "YAML >= 0.38 or YAML::Syck >= 0 required.\n" unless @yamls;
     9 +    # die "YAML >= 0.38 or YAML::Syck >= 0 required.\n" unless @yamls;
    10      return @yamls;
    11  }
    12 +
    13 Index: syck-0.70/lib/bytecode.c
    14 --- syck-0.70/lib/bytecode.c.orig	2009-09-30 19:29:34 +0200
    15 +++ syck-0.70/lib/bytecode.c	2009-11-27 13:24:07 +0100
    16 @@ -7,6 +7,10 @@
    17   *
    18   * Copyright (C) 2003 why the lucky stiff
    19   */
    20 +
    21 +#include <stdlib.h>
    22 +#include <string.h>
    23 +
    24  #include "syck.h"
    26  #if GRAM_FILES_HAVE_TAB_SUFFIX
    27 Index: syck-0.70/lib/handler.c
    28 --- syck-0.70/lib/handler.c.orig	2009-09-30 19:29:34 +0200
    29 +++ syck-0.70/lib/handler.c	2009-11-27 13:24:07 +0100
    30 @@ -7,6 +7,9 @@
    31   * Copyright (C) 2003 why the lucky stiff
    32   */
    34 +#include <stdlib.h>
    35 +#include <string.h>
    36 +
    37  #include "syck.h"
    39  SYMID 
    40 Index: syck-0.70/lib/implicit.c
    41 --- syck-0.70/lib/implicit.c.orig	2009-09-30 19:29:34 +0200
    42 +++ syck-0.70/lib/implicit.c	2009-11-27 13:24:07 +0100
    43 @@ -8,6 +8,7 @@
    44   * Copyright (C) 2003 why the lucky stiff
    45   */
    47 +#include <stdlib.h>
    48  #include "syck.h"
    50  #define YYCTYPE     char
    51 Index: syck-0.70/lib/node.c
    52 --- syck-0.70/lib/node.c.orig	2009-09-30 19:29:34 +0200
    53 +++ syck-0.70/lib/node.c	2009-11-27 13:24:07 +0100
    54 @@ -7,6 +7,9 @@
    55   * Copyright (C) 2003 why the lucky stiff
    56   */
    58 +#include <stdlib.h>
    59 +#include <string.h>
    60 +
    61  #include "syck.h"
    63  /*
    64 Index: syck-0.70/lib/syck.c
    65 --- syck-0.70/lib/syck.c.orig	2009-09-30 19:29:34 +0200
    66 +++ syck-0.70/lib/syck.c	2009-11-27 13:24:07 +0100
    67 @@ -7,6 +7,7 @@
    68   * Copyright (C) 2003 why the lucky stiff
    69   */
    70  #include <stdio.h>
    71 +#include <stdlib.h>
    72  #include <string.h>
    74  #include "syck.h"
    75 @@ -67,12 +68,13 @@
    77      ASSERT( str != NULL );
    78      beg = str->ptr;
    79 +
    80      if ( max_size >= 0 )
    81      {
    82          max_size -= skip;
    83 -        if ( max_size <= 0 )  max_size = 0;
    84 -        else                  str->ptr += max_size;
    85 +        if ( max_size < 0 ) max_size = 0;
    87 +        str->ptr += max_size;
    88          if ( str->ptr > str->end )
    89          {
    90              str->ptr = str->end;
    91 Index: syck-0.70/lib/syck.h
    92 --- syck-0.70/lib/syck.h.orig	2009-09-30 19:29:34 +0200
    93 +++ syck-0.70/lib/syck.h	2009-11-27 13:24:07 +0100
    94 @@ -36,6 +36,8 @@
    96  #include <stddef.h>
    97  #include <stdio.h>
    98 +#include <stdlib.h>
    99 +#include <string.h>
   100  #include <ctype.h>
   101  #ifdef HAVE_ST_H
   102  #include <st.h>
   103 Index: syck-0.70/lib/token.c
   104 --- syck-0.70/lib/token.c.orig	2009-09-30 19:29:34 +0200
   105 +++ syck-0.70/lib/token.c	2009-11-27 13:24:07 +0100
   106 @@ -7,6 +7,8 @@
   107   *
   108   * Copyright (C) 2003 why the lucky stiff
   109   */
   110 +#include <stdlib.h>
   111 +#include <string.h>
   112  #include "syck.h"
   114  #if GRAM_FILES_HAVE_TAB_SUFFIX
   115 Index: syck-0.70/lib/yaml2byte.c
   116 --- syck-0.70/lib/yaml2byte.c.orig	2009-09-30 19:29:34 +0200
   117 +++ syck-0.70/lib/yaml2byte.c	2009-11-27 13:24:31 +0100
   118 @@ -11,6 +11,8 @@
   119   */ 
   120  #include "syck.h"
   121  #include <assert.h>
   122 +#include <stdlib.h>
   123 +#include <string.h>
   124  #define YAMLBYTE_UTF8
   125  #include "yamlbyte.h"

mercurial