# HG changeset patch # User Matti Hamalainen # Date 1526001694 -10800 # Node ID a0166c4050be18a3d5237b21f619ee52f7863bf8 # Parent 1e7f7489d3e07004bc0869972b84b0292fd8c0e3 Fix dmGrowBufPut() to not include extra byte. diff -r 1e7f7489d3e0 -r a0166c4050be src/dmgrowbuf.c --- a/src/dmgrowbuf.c Fri May 11 04:21:15 2018 +0300 +++ b/src/dmgrowbuf.c Fri May 11 04:21:34 2018 +0300 @@ -130,10 +130,10 @@ if (str == NULL) return FALSE; - if (!dmGrowBufGrow(buf, len + 1)) + if (!dmGrowBufGrow(buf, len)) return FALSE; - memcpy(buf->data + buf->len, str, len + 1); + memcpy(buf->data + buf->len, str, len); buf->len += len; return TRUE;