Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 601256 Details for
Bug 844375
Endless loop inside pcre_exec with PCRE_MULTILINE set
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
testing program
pcre_bug.c (text/plain), 900 bytes, created by
Daniel Kopeček
on 2012-07-30 12:51:00 UTC
(
hide
)
Description:
testing program
Filename:
MIME Type:
Creator:
Daniel Kopeček
Created:
2012-07-30 12:51:00 UTC
Size:
900 bytes
patch
obsolete
>#include <stdio.h> >#include <string.h> >#include <pcre.h> > >#define OVEC_LEN 60 >#define BUFLEN 1024*1024*8 > >#define opt_enabled(ch) if (strchr(argv[2], ch) != NULL) > >char buffer[BUFLEN]; > >int main(int argc, char *argv[]) >{ > pcre *regex; > int errors = 0; > const char *errmsg = NULL; > int ovec[OVEC_LEN]; > int ovec_len = OVEC_LEN; > int ofs, ret; > int regex_opts = 0; > int subjlen; > > const char *regex_cstr = argv[1]; > > opt_enabled('8') { > regex_opts |= PCRE_UTF8; > } > opt_enabled('c') { > regex_opts |= PCRE_CASELESS; > } > opt_enabled('m') { > regex_opts |= PCRE_MULTILINE; > } > opt_enabled('d') { > regex_opts |= PCRE_DOTALL; > } > > regex = pcre_compile(regex_cstr, regex_opts, &errmsg, &errors, NULL); > > if (regex == NULL) > return 1; > > subjlen = (int)fread(buffer, 1, BUFLEN, stdin); > > ofs = 1; > ret = pcre_exec(regex, NULL, buffer, subjlen, > ofs, 0, ovec, ovec_len); > > return ret; >}
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 Raw
Actions:
View
Attachments on
bug 844375
: 601256 |
601258