diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/message.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/message.c b/src/core/message.c index 52065bdd..2ff2d6da 100644 --- a/src/core/message.c +++ b/src/core/message.c @@ -110,7 +110,7 @@ nni_chunk_grow(nni_chunk *ch, size_t newsz, size_t headwanted) newsz = ch->ch_len; } - if ((ch->ch_ptr >= ch->ch_buf) && + if ((ch->ch_ptr >= ch->ch_buf) && (ch->ch_ptr != NULL) && (ch->ch_ptr < (ch->ch_buf + ch->ch_cap))) { size_t headroom = (size_t)(ch->ch_ptr - ch->ch_buf); if (headwanted < headroom) { |
