From e54344bd3252108c7c113ea773b3ae9a4e72b427 Mon Sep 17 00:00:00 2001 From: "Thomas E. Dickey" Date: Mon, 10 Apr 2023 22:59:30 +0000 Subject: snapshot of project "lynx", label v2-9-0dev_12c --- WWW/Library/Implementation/HTChunk.c | 11 +++++++---- WWW/Library/Implementation/HTTCP.c | 4 ++-- 2 files changed, 9 insertions(+), 6 deletions(-) (limited to 'WWW/Library/Implementation') diff --git a/WWW/Library/Implementation/HTChunk.c b/WWW/Library/Implementation/HTChunk.c index 6b670116..b9490fd6 100644 --- a/WWW/Library/Implementation/HTChunk.c +++ b/WWW/Library/Implementation/HTChunk.c @@ -1,5 +1,5 @@ /* - * $LynxId: HTChunk.c,v 1.28 2016/11/24 15:29:50 tom Exp $ + * $LynxId: HTChunk.c,v 1.29 2023/04/10 22:58:51 tom Exp $ * * Chunk handling: Flexible arrays * =============================== @@ -197,13 +197,16 @@ HTChunk *HTChunkPutb2(HTChunk *ch, const char *b, int l) HTChunk *chunk; int m = ch->allocated - ch->size; - MemCpy(ch->data + ch->size, b, (unsigned) m); - ch->size += m; + if (m != 0 && b != 0) { + MemCpy(ch->data + ch->size, b, (unsigned) m); + ch->size += m; + } chunk = HTChunkCreateMayFail(ch->growby, ch->failok); ch->next = chunk; ch = chunk; - HTChunkPutb(ch, b + m, l - m); + if (b != 0) + HTChunkPutb(ch, b + m, l - m); } else { MemCpy(ch->data + ch->size, b, (unsigned) l); ch->size += l; diff --git a/WWW/Library/Implementation/HTTCP.c b/WWW/Library/Implementation/HTTCP.c index a3bfda62..087f515a 100644 --- a/WWW/Library/Implementation/HTTCP.c +++ b/WWW/Library/Implementation/HTTCP.c @@ -1,5 +1,5 @@ /* - * $LynxId: HTTCP.c,v 1.163 2022/04/01 23:18:35 Rajeev.V.Pillai Exp $ + * $LynxId: HTTCP.c,v 1.164 2023/04/10 22:41:21 tom Exp $ * * Generic Communication Code HTTCP.c * ========================== @@ -1494,7 +1494,7 @@ static size_t fill_addrinfo(void **buffer, CTRACE((tfp, "filladdr_info %p\n", (const void *) phost)); for (q = phost; q != 0; q = q->ai_next) { ++limit; - need += phost->ai_addrlen; + need += q->ai_addrlen; need += sizeof(LYNX_ADDRINFO); } CTRACE((tfp, "...fill_addrinfo %d:%lu\n", limit, (unsigned long) need)); -- cgit 1.4.1-2-gfad0 s='txt' type='search' size='10' name='q' value=''/>
path: root/docs/README.jp
blob: b2d5a526db002a6bd603cd276fbc8619cdf8033e (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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133