From 8f74020d331f0aa1fd165f2d9490fc66022745c2 Mon Sep 17 00:00:00 2001 From: "Gary E. Miller" Date: Thu, 1 Sep 2016 12:36:04 -0700 Subject: Fix too small buffers. Hex is 2x + 1 the size of binary. --- hex.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'hex.c') diff --git a/hex.c b/hex.c index 0326971c..4d03a698 100644 --- a/hex.c +++ b/hex.c @@ -18,6 +18,8 @@ * scbuflen -- sizeof(scbuf) * *binbuf -- the binary to convert to hex and place in scbuf * binbuflen -- sizeof(binbuf) + * + * scbuflen needs to be 2x binbuflen to hold the hex conversion */ const char *gpsd_packetdump(char *scbuf, size_t scbuflen, -- cgit v1.2.1