commit 1300c32520ee2a36fd9a8882af4be707a55fb100
parent 584c35b9f9c70176a2201d27753ef105341d67ec
Author: sin <sin@2f30.org>
Date: Mon, 21 Mar 2016 11:33:40 +0000
fix size of buf for clarity
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/stun.c b/stun.c
@@ -248,7 +248,7 @@ readnet(int fd, unsigned char *buf, int len)
int
challenge(int netfd)
{
- unsigned char buf[4];
+ unsigned char buf[sizeof(uint32_t)];
struct pollfd pfd[1];
uint32_t n, reply;
int ret;
@@ -280,7 +280,7 @@ challenge(int netfd)
int
response(int netfd)
{
- unsigned char buf[4];
+ unsigned char buf[sizeof(uint32_t)];
uint32_t reply;
if (readnet(netfd, buf, sizeof(buf)) <= 0)