aboutsummaryrefslogtreecommitdiffstats
path: root/main/musl/0012-fix-incorrect-protocol-name-and-number-for-egp.patch
blob: 01858484cdea14910793b2be757f96df9abed043 (plain) (blame)
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
26
27
28
From 4b619e5c61d7d4cf344b355be8b1acb0f0795ea9 Mon Sep 17 00:00:00 2001
From: Andrew Kelley <superjoe30@gmail.com>
Date: Wed, 4 May 2016 13:29:11 -0700
Subject: [PATCH] fix incorrect protocol name and number for egp

previously if you called getprotobyname("egp") you would get
NULL because \008 is invalid octal and so the protocol id was
interpreted as 0 and name as "8egp".
---
 src/network/proto.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/network/proto.c b/src/network/proto.c
index a42d145..c4fd34e 100644
--- a/src/network/proto.c
+++ b/src/network/proto.c
@@ -12,7 +12,7 @@ static const unsigned char protos[] = {
 	"\004ipencap\0"
 	"\005st\0"
 	"\006tcp\0"
-	"\008egp\0"
+	"\010egp\0"
 	"\014pup\0"
 	"\021udp\0"
 	"\024hmp\0"
-- 
2.8.2