Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/pcre2_compile_class.c
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,7 @@ cranges->header.next = NULL;
#ifdef PCRE2_DEBUG
cranges->header.type = CDATA_CRANGE;
#endif
cranges->range_list_size = (uint16_t)range_list_size;
cranges->range_list_size = range_list_size;
cranges->char_lists_types = 0;
cranges->char_lists_size = 0;
cranges->char_lists_start = 0;
Expand Down Expand Up @@ -618,7 +618,7 @@ ptr = buffer;
while (ptr < dst && ptr[1] < 0x100) ptr += 2;
if (dst - ptr < (2 * (6 - 1)))
{
cranges->range_list_size = (uint16_t)(dst + 2 - buffer);
cranges->range_list_size = (size_t)(dst + 2 - buffer);
return cranges;
}

Expand Down Expand Up @@ -740,7 +740,7 @@ PCRE2_ASSERT((uint16_t*)dst <= next_char);
cranges->char_lists_size =
(size_t)((uint8_t*)(buffer + total_size) - (uint8_t*)next_char);
cranges->char_lists_start = (size_t)((uint8_t*)next_char - (uint8_t*)buffer);
cranges->range_list_size = (uint16_t)(dst - buffer);
cranges->range_list_size = (size_t)(dst - buffer);
return cranges;
}

Expand Down
2 changes: 1 addition & 1 deletion src/pcre2_intmodedep.h
Original file line number Diff line number Diff line change
Expand Up @@ -778,7 +778,7 @@ typedef struct class_ranges {
compile_data header; /* Common header */
size_t char_lists_size; /* Total size of encoded char lists */
size_t char_lists_start; /* Start offset of encoded char lists */
uint16_t range_list_size; /* Size of ranges array */
size_t range_list_size; /* Size of ranges array */
uint16_t char_lists_types; /* The XCL_LIST header of char lists */
/* Followed by the list of ranges (start/end pairs) */
} class_ranges;
Expand Down