Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F153069510
D18611.id52179.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D18611.id52179.diff
View Options
Index: head/lib/libc/regex/regcomp.c
===================================================================
--- head/lib/libc/regex/regcomp.c
+++ head/lib/libc/regex/regcomp.c
@@ -1841,29 +1841,21 @@
{
int ch;
int mindex;
- int cmin, cmax;
- /*
- * For UTF-8 we process only the first 128 characters corresponding to
- * the POSIX locale.
- */
- cmin = MB_CUR_MAX == 1 ? CHAR_MIN : 0;
- cmax = MB_CUR_MAX == 1 ? CHAR_MAX : 127;
-
/* Avoid making errors worse */
if (p->error != 0)
return;
- g->charjump = (int *)malloc((cmax - cmin + 1) * sizeof(int));
+ g->charjump = (int *)malloc((NC_MAX + 1) * sizeof(int));
if (g->charjump == NULL) /* Not a fatal error */
return;
/* Adjust for signed chars, if necessary */
- g->charjump = &g->charjump[-(cmin)];
+ g->charjump = &g->charjump[-(CHAR_MIN)];
/* If the character does not exist in the pattern, the jump
* is equal to the number of characters in the pattern.
*/
- for (ch = cmin; ch < cmax + 1; ch++)
+ for (ch = CHAR_MIN; ch < (CHAR_MAX + 1); ch++)
g->charjump[ch] = g->mlen;
/* If the character does exist, compute the jump that would
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Apr 19, 10:56 PM (11 h, 28 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31806128
Default Alt Text
D18611.id52179.diff (1 KB)
Attached To
Mode
D18611: PR234066: jemalloc assertion failure in less
Attached
Detach File
Event Timeline
Log In to Comment