summaryrefslogtreecommitdiff
path: root/hex.c
diff options
context:
space:
mode:
authorGary E. Miller <gem@rellim.com>2016-09-01 12:36:04 -0700
committerGary E. Miller <gem@rellim.com>2016-09-01 12:36:04 -0700
commit8f74020d331f0aa1fd165f2d9490fc66022745c2 (patch)
tree54602a867b2d0161ddcffb070fdb0f49f38e9a7d /hex.c
parentee329c32da0ab85e1a3334ce5377f0b57cf954ce (diff)
downloadgpsd-8f74020d331f0aa1fd165f2d9490fc66022745c2.tar.gz
Fix too small buffers. Hex is 2x + 1 the size of binary.
Diffstat (limited to 'hex.c')
-rw-r--r--hex.c2
1 files changed, 2 insertions, 0 deletions
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,