1
1

buffer: Do not call explicit_bzero with null arguments

This allows compiling and testing with undefined sanitizer.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
Этот коммит содержится в:
Nikos Mavrogiannopoulos 2018-04-18 09:09:05 +02:00 коммит произвёл Andreas Schneider
родитель eb796b4bbb
Коммит 3f562ee586

Просмотреть файл

@ -195,7 +195,9 @@ static void buffer_shift(ssh_buffer buffer){
int ssh_buffer_reinit(struct ssh_buffer_struct *buffer)
{
buffer_verify(buffer);
if (buffer->used > 0) {
explicit_bzero(buffer->data, buffer->used);
}
buffer->used = 0;
buffer->pos = 0;