Skip to content
Open
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
11 changes: 8 additions & 3 deletions cJSON_Utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -371,18 +371,23 @@ static void decode_pointer_inplace(unsigned char *string)
if (string[1] == '0')
{
decoded_string[0] = '~';
string++;
}
else if (string[1] == '1')
{
decoded_string[1] = '/';
decoded_string[0] = '/';
string++;
}
else
{
/* invalid escape sequence */
*decoded_string = '\0';
return;
}

string++;
}
else
{
decoded_string[0] = string[0];
}
}

Expand Down