]> git.ipfire.org Git - people/ms/ipfire-3.x.git/blame - patch/patches/patch-2.5.4-sigsegv.patch
Move all packages to root.
[people/ms/ipfire-3.x.git] / patch / patches / patch-2.5.4-sigsegv.patch
CommitLineData
7fdaad7a
MT
1diff -up patch-2.6/src/inp.c.sigsegv patch-2.6/src/inp.c
2--- patch-2.6/src/inp.c.sigsegv 2009-11-02 19:09:57.000000000 +0000
3+++ patch-2.6/src/inp.c 2009-11-16 09:31:52.305022200 +0000
4@@ -77,6 +77,14 @@ re_input (void)
5 }
6 }
7
8+void
9+reset_scan_input_vars()
10+{
11+ using_plan_a = 1;
12+ i_buffer = NULL;
13+ i_ptr = NULL;
14+}
15+
16 /* Construct the line index, somehow or other. */
17
18 void
19diff -up patch-2.6/src/inp.h.sigsegv patch-2.6/src/inp.h
20--- patch-2.6/src/inp.h.sigsegv 2009-11-02 19:09:57.000000000 +0000
21+++ patch-2.6/src/inp.h 2009-11-16 09:32:24.440021838 +0000
22@@ -24,4 +24,5 @@ XTERN LINENUM input_lines; /* how long
23 char const *ifetch (LINENUM, bool, size_t *);
24 void get_input_file (char const *, char const *);
25 void re_input (void);
26+void reset_scan_input_vars (void);
27 void scan_input (char *);
28diff -up patch-2.6/src/patch.c.sigsegv patch-2.6/src/patch.c
29--- patch-2.6/src/patch.c.sigsegv 2009-11-02 19:09:57.000000000 +0000
30+++ patch-2.6/src/patch.c 2009-11-16 09:31:52.306021801 +0000
31@@ -210,7 +210,10 @@ main (int argc, char **argv)
32
33 /* find out where all the lines are */
34 if (!skip_rest_of_patch)
35- scan_input (inname);
36+ scan_input (inname);
37+ else
38+ reset_scan_input_vars ();
39+
40
41 /* from here on, open no standard i/o files, because malloc */
42 /* might misfire and we can't catch it easily */