Commit 95d136acd37c706e1f4874b6606e5b70917a0d79

Stefan Sperling 2022-06-16T21:26:24

fix wrong pointer in NULL check; found by tracey

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/tog/tog.c b/tog/tog.c
index fec39d1..36dceb2 100644
--- a/tog/tog.c
+++ b/tog/tog.c
@@ -3152,7 +3152,7 @@ add_matched_line(int *wtotal, const char *line, int wlimit, int col_tab_align,
 		goto done;
 	}
 	seg2 = strdup(exstr + rme);
-	if (seg1 == NULL) {
+	if (seg2 == NULL) {
 		err = got_error_from_errno("strndup");
 		goto done;
 	}