tytest: fix runtime error: null pointer passed as argument 2, which is declared to never be null

terminology-1.5
Boris Faure 4 years ago
parent 58df5715d1
commit fa07767115
  1. 7
      src/bin/tytest.c

@ -139,8 +139,11 @@ _tytest_checksum(Termpty *ty)
MD5Update(&ctx, (unsigned char const*)_cursor_shape,
strlen(_cursor_shape));
/* Write buffer */
MD5Update(&ctx, (unsigned char const*)ty->write_buffer.buf,
ty->write_buffer.len);
if (ty->write_buffer.buf)
{
MD5Update(&ctx, (unsigned char const*)ty->write_buffer.buf,
ty->write_buffer.len);
}
MD5Final(hash, &ctx);

Loading…
Cancel
Save