Added a size argument to hex2bin.

This avoids buffer overflows and related bad things.
This commit is contained in:
Håvard Pettersson 2014-09-20 20:28:03 +02:00
parent f59a282db1
commit 43146709b2
5 changed files with 6 additions and 7 deletions

View file

@ -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);