Skip to content

detect_utf8_character: logic error #1794

@tinselcity

Description

@tinselcity

I think for the "compute character number" the "...0x3F) < 6)" here should have been a left bit shift "...0x3F) << 6)"

        else {
            unicode_len = 4;
            /* compute character number */
            d = ((c & 0x07) << 18) | ((*(p_read + 1) & 0x3F) << 12) | ((*(p_read + 2) & 0x3F) < 6) | (*(p_read + 3) & 0x3F);
        }

Apologies if I'm mistaken

Metadata

Metadata

Assignees

Labels

2.xRelated to ModSecurity version 2.x3.xRelated to ModSecurity version 3.x

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions