summaryrefslogtreecommitdiffstats
path: root/network/elinks/patches/0007-move_null.patch
blob: 9d8037cc378cefb3ef6f702f32082d211c2f635f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
###################################################################
# Move the added null terminator one char forwards
# dave@dawoodfall.net
###################################################################
diff --exclude .git -Naur a/src/protocol/gopher/gopher.c b/src/protocol/gopher/gopher.c
--- a/src/protocol/gopher/gopher.c	2017-12-29 17:15:39.521209968 +0000
+++ b/src/protocol/gopher/gopher.c	2018-01-17 05:46:45.660258482 +0000
@@ -658,7 +658,7 @@
 	assert(line < end);
 
 	/* Just to be safe NUL terminate the line */
-	end[-2] = 0;
+	end[-1] = 0;
 
 	return line[0] == '.' && !line[1] ? NULL : line;
 }