shithub: scc

Download patch

ref: bf06512e77f04190d1f1ed54faced3ee8f1097d5
parent: 2d1b151c900071e5362b23e2e673c3cc0221c166
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Fri Aug 30 07:25:41 EDT 2019

[libmach/coff32] Fix return code of readstr()

The condition was inverted.

--- a/src/libmach/coff32/coff32read.c
+++ b/src/libmach/coff32/coff32read.c
@@ -165,7 +165,7 @@
 	coff->strtbl = str;
 	coff->strsiz = siz;
 
-	return fread(str+4, siz-4, 1, fp) != 1;
+	return fread(str+4, siz-4, 1, fp) == 1;
 }
 
 static int