shithub: riscv

Download patch

ref: b6fde0c7b9fd2f02372e6276f0321cd195fabbdb
parent: de34481f8b80306b58687c1a3039feb785c4f98f
author: Sigrid <[email protected]>
date: Thu Aug 20 04:28:24 EDT 2020

libaml: fix fault when the second operand of comparison cannot be converted

--- a/sys/src/libaml/aml.c
+++ b/sys/src/libaml/aml.c
@@ -1524,7 +1524,7 @@
 		tag = TAG(a);
 		if(b == nil || TAG(b) != tag)
 			b = copy(tag, b);
-		if(TAG(b) != tag)
+		if(b == nil || TAG(b) != tag)
 			return -1;	/* botch */
 		switch(tag){
 		default: