| 244 | } |
| 245 | |
| 246 | bencode_item_t *bencode_string_len_dup(bencode_buffer_t *buf, const char *s, int len) { |
| 247 | char *sd = __bencode_alloc(buf, len); |
| 248 | if (!sd) |
| 249 | return NULL; |
| 250 | memcpy(sd, s, len); |
| 251 | return bencode_string_len(buf, sd, len); |
| 252 | } |
| 253 | |
| 254 | bencode_item_t *bencode_string_len(bencode_buffer_t *buf, const char *s, int len) { |
| 255 | return __bencode_string_alloc(buf, s, len, len, 1, BENCODE_STRING); |
no test coverage detected