Skip to content

OMJSON can send invalid UTF8 strings #19

@sclaiborne

Description

@sclaiborne

This code checks for invalid whitespace but can still be invalid UTF8. Websockets as text must be utf8.

		// Check for invalid whitespace characters
		if (*ptr < 32 && *ptr > 0 && !(*ptr >= 8 && *ptr <= 13 && *ptr != 11)) {
			length = stringlcpy(pDest, "Invalid String", maxLength+1);
			length = length > maxLength ? maxLength : length;
			return length;
		}

Example failure:

0xFF 0xFE

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions