Browse code

tm: lw parser - fix matching To header in lw_get_hf_name()

Daniel-Constantin Mierla authored on 05/05/2021 16:56:04
Showing 1 changed files
... ...
@@ -188,9 +188,11 @@ char *lw_get_hf_name(char *begin, char *end, enum _hdr_types_t *type)
188 188
 
189 189
 				case 't': /* To */
190 190
 					if(LOWER_BYTE(*(p + 1)) == 'o') {
191
-						p += 2;
192
-						*type = HDR_TO_T;
193
-						break;
191
+						if((*(p + 2) == ' ') || (*(p + 2) == ':')) {
192
+							p += 2;
193
+							*type = HDR_TO_T;
194
+							break;
195
+						}
194 196
 					}
195 197
 					if((*(p + 1) == ' ') || (*(p + 1) == ':')) {
196 198
 						p++;