Browse code

- fixed crash caused by incorrect to/from, patch provided by Bogdan Pintea closes SER-373

Jan Janak authored on 23/06/2008 17:07:41
Showing 1 changed files
... ...
@@ -626,7 +626,8 @@ char* parse_to(char* buffer, char *end, struct to_body *to_b)
626 626
 					case URI_OR_TOKEN:
627 627
 					case DISPLAY_TOKEN: 
628 628
 					case MAYBE_URI_END:
629
-						to_b->display.len=foo-to_b->display.s;
629
+						/* deal with the incorrect displayname<uri>.. */
630
+						to_b->display.len=(foo?foo:tmp)-to_b->display.s;
630 631
 						status = S_URI_ENCLOSED;
631 632
 						break;
632 633
 					case F_CRLF: