Added a size argument to hex2bin.
This avoids buffer overflows and related bad things.
This commit is contained in:
parent
f59a282db1
commit
43146709b2
5 changed files with 6 additions and 7 deletions
|
@ -26,7 +26,7 @@
|
|||
#include <tox/tox.h>
|
||||
|
||||
void
|
||||
tox_weechat_hex2bin(const char *hex, char *out);
|
||||
tox_weechat_hex2bin(const char *hex, size_t length, char *out);
|
||||
|
||||
void
|
||||
tox_weechat_bin2hex(const uint8_t *bin, size_t size, char *out);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue