Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 225587 Details for
Bug 311759
sys-apps/grep-2.6.1 null pointer reference when using --include or --exclude
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed patch.
grep-2.6.1-isdir_segfault-include_fix.patch (text/plain), 1.29 KB, created by
Javier Villavicencio (RETIRED)
on 2010-03-28 17:58:14 UTC
(
hide
)
Description:
Proposed patch.
Filename:
MIME Type:
Creator:
Javier Villavicencio (RETIRED)
Created:
2010-03-28 17:58:14 UTC
Size:
1.29 KB
patch
obsolete
>--- grep-2.6.1/lib/exclude.c.orig >+++ grep-2.6.1/lib/exclude.c >@@ -342,7 +342,7 @@ > { > char const *pattern = exclude[i].pattern; > int options = exclude[i].options; >- if (excluded != exclude_fnmatch (pattern, f, options)) >+ if (exclude_fnmatch (pattern, f, options)) > return !excluded; > } > return excluded; >--- grep-2.6.1/lib/savedir.c.orig >+++ grep-2.6.1/lib/savedir.c >@@ -48,7 +48,7 @@ > size_t dirlen = strlen (dir); > size_t filelen = strlen (file); > >- while (dirlen && path[dirlen - 1] == '/') >+ while (dirlen && dir[dirlen - 1] == '/') > dirlen--; > > if ((dirlen + filelen + 2) > pathlen) >@@ -112,7 +112,7 @@ > && !isdir1 (dir, dp->d_name)) > { > if (included_patterns >- && !excluded_file_name (included_patterns, dp->d_name)) >+ && excluded_file_name (included_patterns, dp->d_name)) > continue; > if (excluded_patterns > && excluded_file_name (excluded_patterns, dp->d_name)) >--- grep-2.6.1/src/main.c.orig >+++ grep-2.6.1/src/main.c >@@ -2066,7 +2066,7 @@ > case INCLUDE_OPTION: > if (!included_patterns) > included_patterns = new_exclude (); >- add_exclude (included_patterns, optarg, EXCLUDE_INCLUDE); >+ add_exclude (included_patterns, optarg, EXCLUDE_INCLUDE | EXCLUDE_WILDCARDS); > break; > > case GROUP_SEPARATOR_OPTION: >
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 311759
: 225587