Mercurial > dropbear
comparison buffer.c @ 1776:290caf301a4f
Remove accidentally committed abort()
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Fri, 13 Nov 2020 23:16:50 +0800 |
parents | b688c884dad7 |
children | 8b4274d34fe8 |
comparison
equal
deleted
inserted
replaced
1775:8179eabe16c9 | 1776:290caf301a4f |
---|---|
186 /* like buf_getptr, but checks against total size, not used length. | 186 /* like buf_getptr, but checks against total size, not used length. |
187 * This allows writing past the used length, but not past the size */ | 187 * This allows writing past the used length, but not past the size */ |
188 unsigned char* buf_getwriteptr(const buffer* buf, unsigned int len) { | 188 unsigned char* buf_getwriteptr(const buffer* buf, unsigned int len) { |
189 | 189 |
190 if (len > BUF_MAX_INCR || buf->pos + len > buf->size) { | 190 if (len > BUF_MAX_INCR || buf->pos + len > buf->size) { |
191 abort(); | |
192 dropbear_exit("Bad buf_getwriteptr"); | 191 dropbear_exit("Bad buf_getwriteptr"); |
193 } | 192 } |
194 return &buf->data[buf->pos]; | 193 return &buf->data[buf->pos]; |
195 } | 194 } |
196 | 195 |