FreeBSD Bugzilla – Attachment 152888 Details for
Bug 197555
[patch] bsdgrep segfaults with --color and overlapping patterns
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
add an assert to printline to aid debugging
grep.diff (text/plain), 666 bytes, created by
Jason McSweeney
on 2015-02-12 02:11:27 UTC
(
hide
)
Description:
add an assert to printline to aid debugging
Filename:
MIME Type:
Creator:
Jason McSweeney
Created:
2015-02-12 02:11:27 UTC
Size:
666 bytes
patch
obsolete
>Index: util.c >=================================================================== >--- util.c (revision 278606) >+++ util.c (working copy) >@@ -35,6 +35,7 @@ > #include <sys/stat.h> > #include <sys/types.h> > >+#include <assert.h> > #include <ctype.h> > #include <err.h> > #include <errno.h> >@@ -466,8 +467,13 @@ > if ((oflag || color) && m > 0) { > for (i = 0; i < m; i++) { > if (!oflag) >+ { >+ assert(a >= 0 && matches[i].rm_so >= 0 && >+ a <= (size_t) matches[i].rm_so); >+ > fwrite(line->dat + a, matches[i].rm_so - a, 1, > stdout); >+ } > if (color) > fprintf(stdout, "\33[%sm\33[K", color); >
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 197555
: 152888