[core] fix buffer_copy_string_hex() assert (fixes #2742)
fix buffer_copy_string_hex() passing incorrect length to li_tohex() (thx Isibaar) x-ref: "Assert wrongly triggered in buffer_copy_string_hex()" https://redmine.lighttpd.net/issues/2742
This commit is contained in:
parent
acd5e450b5
commit
ebf3af8b12
|
@ -486,7 +486,7 @@ void buffer_copy_string_hex(buffer *b, const char *in, size_t in_len) {
|
|||
force_assert(in_len * 2 > in_len);
|
||||
|
||||
buffer_string_set_length(b, 2 * in_len);
|
||||
li_tohex(b->ptr, buffer_string_space(b)+1, in, in_len);
|
||||
li_tohex(b->ptr, buffer_string_length(b)+1, in, in_len);
|
||||
}
|
||||
|
||||
/* everything except: ! ( ) * - . 0-9 A-Z _ a-z ~ */
|
||||
|
|
Loading…
Reference in New Issue