aboutsummaryrefslogtreecommitdiffstats
path: root/main/musl/0002-ns_parse.c-fix-ns_skiprr.patch
blob: f74d33226c1f3e928cdad8f5b268017f15abdf5b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
From 06bc5ba10113ab72ac8bf0b81defffa353146496 Mon Sep 17 00:00:00 2001
From: Yu Lu <pentium.luyu@gmail.com>
Date: Tue, 7 Jul 2015 10:34:02 +0300
Subject: [PATCH] ns_parse.c: fix ns_skiprr

---
 src/network/ns_parse.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/network/ns_parse.c b/src/network/ns_parse.c
index 3ff33a8..d01da47 100644
--- a/src/network/ns_parse.c
+++ b/src/network/ns_parse.c
@@ -95,7 +95,7 @@ int ns_skiprr(const unsigned char *ptr, const unsigned char *eom, ns_sect sectio
 			p += r;
 		}
 	}
-	return ptr - p;
+	return p - ptr;
 bad:
 	errno = EMSGSIZE;
 	return -1;
-- 
2.4.5