Fix fuzz-sshpacketmutator to work

This commit is contained in:
Matt Johnston
2020-10-26 22:52:07 +08:00
parent acd6a22a0c
commit 1260fbc5cd
5 changed files with 67 additions and 36 deletions

View File

@@ -188,6 +188,7 @@ unsigned char* buf_getptr(const buffer* buf, unsigned int len) {
unsigned char* buf_getwriteptr(const buffer* buf, unsigned int len) {
if (len > BUF_MAX_INCR || buf->pos + len > buf->size) {
abort();
dropbear_exit("Bad buf_getwriteptr");
}
return &buf->data[buf->pos];