| 264 | } |
| 265 | |
| 266 | static bool DecodeEscapedChar(const char** cursor, char* out) |
| 267 | { |
| 268 | if (**cursor != '\\') |
| 269 | { |
| 270 | *out = **cursor; |
| 271 | ++(*cursor); |
| 272 | return true; |
| 273 | } |
| 274 | |
| 275 | ++(*cursor); |
| 276 | if (**cursor == 0) |
| 277 | return false; |
| 278 | |
| 279 | if (IsDigit((*cursor)[0]) && IsDigit((*cursor)[1]) && IsDigit((*cursor)[2])) |
| 280 | { |
| 281 | *out = (char) ((((*cursor)[0] - '0') * 100) + (((*cursor)[1] - '0') * 10) + ((*cursor)[2] - '0')); |
| 282 | *cursor += 3; |
| 283 | return true; |
| 284 | } |
| 285 | |
| 286 | *out = **cursor; |
| 287 | ++(*cursor); |
| 288 | return true; |
| 289 | } |
| 290 | |
| 291 | static void EscapeDnsText(const char* value, char* out, uint32_t out_size) |
| 292 | { |
no test coverage detected