Browse Source

apply a segfault fix from sudosh2

Ralf S. Engelschall 18 years ago
parent
commit
26e3670406
2 changed files with 15 additions and 5 deletions
  1. 14 4
      sudosh/sudosh.patch
  2. 1 1
      sudosh/sudosh.spec

+ 14 - 4
sudosh/sudosh.patch

@@ -1,6 +1,6 @@
 Index: src/Makefile.in
 --- src/Makefile.in.orig	2005-06-13 04:33:29 +0200
-+++ src/Makefile.in	2007-01-07 10:55:05 +0100
++++ src/Makefile.in	2007-12-28 10:43:39 +0100
 @@ -427,7 +427,7 @@
  
  install-sudosh.conf:
@@ -12,7 +12,7 @@ Index: src/Makefile.in
  # Tell versions [3.59,3.63) of GNU make to not export all variables.
 Index: src/getopt.c
 --- src/getopt.c.orig	2005-06-13 01:22:42 +0200
-+++ src/getopt.c	2007-01-07 10:54:52 +0100
++++ src/getopt.c	2007-12-28 10:43:39 +0100
 @@ -37,6 +37,8 @@
  #include "config.h"
  #endif
@@ -24,7 +24,7 @@ Index: src/getopt.c
     reject `defined (const)'.  */
 Index: src/parse.c
 --- src/parse.c.orig	2005-06-13 01:22:42 +0200
-+++ src/parse.c	2007-01-07 10:54:52 +0100
++++ src/parse.c	2007-12-28 10:43:39 +0100
 @@ -19,7 +19,8 @@
  void parse(option * o, const char *file)
  {
@@ -35,9 +35,19 @@ Index: src/parse.c
      char line[BUFSIZ];
      char *arg, *cmt, *opt;
      config *scan;
+@@ -38,6 +39,9 @@
+ 	while (isspace(*opt))
+ 	    opt++;
+ 
++	if (strlen(opt)==0)
++		continue;
++
+ 	for (i = strlen(opt) - 1; i >= 0 && isspace(opt[i]); i--)
+ 	    opt[i] = '\0';
+ 
 Index: src/sudosh.c
 --- src/sudosh.c.orig	2005-06-13 04:35:07 +0200
-+++ src/sudosh.c	2007-01-07 10:54:52 +0100
++++ src/sudosh.c	2007-12-28 10:43:39 +0100
 @@ -28,6 +28,13 @@
  
  #define WRITE(a, b, c) do_write(a, b, c, __FILE__, __LINE__)

+ 1 - 1
sudosh/sudosh.spec

@@ -33,7 +33,7 @@ Class:        EVAL
 Group:        ShellUtils
 License:      Open Software License
 Version:      1.8.2
-Release:      20071027
+Release:      20071228
 
 #   package options
 %option       with_fsl  yes