shithub: drawterm

Download patch

ref: 2c1e851527d9803cc586d129613fb052d932eda4
parent: 51d6c97ce45cbc9edfe599918d0e964450a37b74
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Fri Oct 22 09:39:18 EDT 2021

libsec: fix wrong assert condition

--- a/libsec/tlshand.c
+++ b/libsec/tlshand.c
@@ -2354,7 +2354,7 @@
 	DigestState *s;
 	int n;
 
-	assert(sizeof(ai) <= xlen && sizeof(tmp) <= xlen);
+	assert(xlen <= sizeof(ai) && xlen <= sizeof(tmp));
 	// generate a1
 	s = x(label, nlabel, key, nkey, nil, nil);
 	x(seed, nseed, key, nkey, ai, s);