Fix out-of-bounds buffer access in parse_command
authorSören Tempel <soeren+git@soeren-tempel.net>
Sun, 11 Nov 2018 22:35:25 +0000 (23:35 +0100)
committerSören Tempel <soeren+git@soeren-tempel.net>
Sun, 11 Nov 2018 22:35:25 +0000 (23:35 +0100)
commit84e59ff12f88fb44f5371813dbd757209a616caa
tree56b192acb3c6de2e2a75cbf18a9d782274e6166c
parent502b49a6465804b331917761c6b8e3948e851d94
Fix out-of-bounds buffer access in parse_command

Since the cmd buffer needs to be null terminated we need to reserve
space for the null byte in the buffer.

Without this change an out-of-bounds buffer access is performed if the
first word is longer than 19 chars.

Fixes #529
src/ex.c