MCPcopy Create free account
hub / github.com/ading2210/linuxpdf / parse_hex_buf

Function parse_hex_buf

tinyemu/fs_net.c:2452–2468  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2450 void *opaque);
2451
2452static int parse_hex_buf(uint8_t *buf, int buf_size, const char **pp)
2453{
2454 char buf1[1024];
2455 int len;
2456
2457 if (parse_fname(buf1, sizeof(buf1), pp) < 0)
2458 return -1;
2459 len = strlen(buf1);
2460 if ((len & 1) != 0)
2461 return -1;
2462 len >>= 1;
2463 if (len > buf_size)
2464 return -1;
2465 if (decode_hex(buf, buf1, len) < 0)
2466 return -1;
2467 return len;
2468}
2469
2470static int fs_cmd_xhr(FSDevice *fs, FSFile *f,
2471 const char *p, uint32_t uid, uint32_t gid)

Callers 3

fs_cmd_xhrFunction · 0.85
fs_cmd_set_base_urlFunction · 0.85
fs_cmd_pbkdf2Function · 0.85

Calls 2

parse_fnameFunction · 0.85
decode_hexFunction · 0.85

Tested by

no test coverage detected