| 308 | } |
| 309 | |
| 310 | static bool DecodeEscapedChar(const char** cursor, char* out) |
| 311 | { |
| 312 | if (**cursor != '\\') |
| 313 | { |
| 314 | *out = **cursor; |
| 315 | ++(*cursor); |
| 316 | return true; |
| 317 | } |
| 318 | |
| 319 | ++(*cursor); |
| 320 | if (**cursor == 0) |
| 321 | return false; |
| 322 | |
| 323 | if (IsDigit((*cursor)[0]) && IsDigit((*cursor)[1]) && IsDigit((*cursor)[2])) |
| 324 | { |
| 325 | *out = (char) ((((*cursor)[0] - '0') * 100) + (((*cursor)[1] - '0') * 10) + ((*cursor)[2] - '0')); |
| 326 | *cursor += 3; |
| 327 | return true; |
| 328 | } |
| 329 | |
| 330 | *out = **cursor; |
| 331 | ++(*cursor); |
| 332 | return true; |
| 333 | } |
| 334 | |
| 335 | static void EscapeDnsText(const char* value, char* out, uint32_t out_size) |
| 336 | { |
no test coverage detected