Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 61679 Details for
Bug 89533
new package suggestion: Code::Blocks - a cross-platform C/C++ IDE
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Fixes crashes in regcomp function
regcomp_crashes.patch (text/plain), 3.84 KB, created by
Joshua Anderson
on 2005-06-21 16:04:25 UTC
(
hide
)
Description:
Fixes crashes in regcomp function
Filename:
MIME Type:
Creator:
Joshua Anderson
Created:
2005-06-21 16:04:25 UTC
Size:
3.84 KB
patch
obsolete
>diff -Naur src.orig/plugins/compilergcc/depslib/src/headers.c src/plugins/compilergcc/depslib/src/headers.c >--- src.orig/plugins/compilergcc/depslib/src/headers.c 2005-04-12 16:08:20.000000000 -0500 >+++ src/plugins/compilergcc/depslib/src/headers.c 2005-06-20 17:30:04.000000000 -0500 >@@ -40,12 +40,12 @@ > printf("header scan %s\n", file); > > if (!hdrre) >- hdrre = regcomp("^[ ]*#[ ]*include[ ]*([<\"])([^\">]*)([\">]).*$"); >+ hdrre = my_regcomp("^[ ]*#[ ]*include[ ]*([<\"])([^\">]*)([\">]).*$"); > re = hdrre; > > while (fgets(buf, sizeof(buf), f)) > { >- if (regexec(re, buf) && re->startp[3]) >+ if (my_regexec(re, buf) && re->startp[3]) > { > char buf2[MAXSYM]; > >@@ -147,7 +147,7 @@ > > void donehdrs(void) > { >- redone(hdrre); >+ my_redone(hdrre); > hdrre = 0; > hashdone(headerhash); > headerhash = 0; >diff -Naur src.orig/plugins/compilergcc/depslib/src/regexp.c src/plugins/compilergcc/depslib/src/regexp.c >--- src.orig/plugins/compilergcc/depslib/src/regexp.c 2005-04-12 16:08:20.000000000 -0500 >+++ src/plugins/compilergcc/depslib/src/regexp.c 2005-06-20 17:29:43.000000000 -0500 >@@ -156,7 +156,7 @@ > #define UCHARAT(p) ((int)*(p)&CHARBITS) > #endif > >-#define FAIL(m) { regerror(m); return(NULL); } >+#define FAIL(m) { my_regerror(m); return(NULL); } > #define ISMULT(c) ((c) == '*' || (c) == '+' || (c) == '?') > > /* >@@ -212,7 +212,7 @@ > * of the structure of the compiled regexp. > */ > regexp * >-regcomp( const char *exp ) >+my_regcomp( const char *exp ) > { > register regexp *r; > register char *scan; >@@ -791,7 +791,7 @@ > - regexec - match a regexp against a string > */ > int >-regexec( >+my_regexec( > register regexp *prog, > register const char *string ) > { >@@ -799,13 +799,13 @@ > > /* Be paranoid... */ > if (prog == NULL || string == NULL) { >- regerror("NULL parameter"); >+ my_regerror("NULL parameter"); > return(0); > } > > /* Check validity of program. */ > if (UCHARAT(prog->program) != MAGIC) { >- regerror("corrupted program"); >+ my_regerror("corrupted program"); > return(0); > } > >@@ -1070,7 +1070,7 @@ > return(1); /* Success! */ > break; > default: >- regerror("memory corruption"); >+ my_regerror("memory corruption"); > return(0); > break; > } >@@ -1082,7 +1082,7 @@ > * We get here only if there's trouble -- normally "case END" is > * the terminating point. > */ >- regerror("corrupted pointers"); >+ my_regerror("corrupted pointers"); > return(0); > } > >@@ -1122,7 +1122,7 @@ > } > break; > default: /* Oh dear. Called inappropriately. */ >- regerror("internal foulup"); >+ my_regerror("internal foulup"); > count = 0; /* Best compromise. */ > break; > } >@@ -1277,7 +1277,7 @@ > p = "WORDZ"; > break; > default: >- regerror("corrupted opcode"); >+ my_regerror("corrupted opcode"); > break; > } > if (p != NULL) >@@ -1319,14 +1319,14 @@ > #endif > > void >-regerror( const char *s ) >+my_regerror( const char *s ) > { > printf( "re error %s\n", s ); > } > > /* TNB */ > void >-redone(regexp *re) >+my_redone(regexp *re) > { > if (re) > free((char *) re); >diff -Naur src.orig/plugins/compilergcc/depslib/src/regexp.h src/plugins/compilergcc/depslib/src/regexp.h >--- src.orig/plugins/compilergcc/depslib/src/regexp.h 2005-04-12 16:08:20.000000000 -0500 >+++ src/plugins/compilergcc/depslib/src/regexp.h 2005-06-20 17:29:36.000000000 -0500 >@@ -18,10 +18,10 @@ > char program[1]; /* Unwarranted chumminess with compiler. */ > } regexp; > >-regexp *regcomp( const char *exp ); >-int regexec( regexp *prog, const char *string ); >-void regerror( const char *s ); >-void redone( regexp *prog ); /* TNB */ >+regexp *my_regcomp( const char *exp ); >+int my_regexec( regexp *prog, const char *string ); >+void my_regerror( const char *s ); >+void my_redone( regexp *prog ); /* TNB */ > > /* > * The first byte of the regexp internal "program" is actually this magic
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 89533
:
61678
|
61679
|
61680
|
61687
|
64486
|
65194
|
65195
|
72819
|
72820
|
73968
|
75046
|
75048
|
76289
|
76841
|
77788
|
77813
|
81421
|
81457
|
82344
|
82345
|
82346
|
86408
|
86560
|
95867
|
101642
|
106987