Changeset 576 for pjproject/trunk/pjsip/src/pjsip/sip_parser.c
- Timestamp:
- Jul 2, 2006 2:53:05 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsip/sip_parser.c
r515 r576 479 479 rec.hname_len = strlen(name); 480 480 if (rec.hname_len >= sizeof(rec.hname)) { 481 pj_assert(!"Header name is too long!"); 481 482 return PJ_ENAMETOOLONG; 482 483 } … … 546 547 547 548 if (hname->slen >= PJSIP_MAX_HNAME_LEN) { 548 pj_assert(!"Header name is too long!"); 549 /* Guaranteed not to be able to find handler. */ 549 550 return NULL; 550 551 } … … 832 833 pjsip_parse_hdr_func * handler; 833 834 pjsip_hdr *hdr = NULL; 835 836 /* Init hname just in case parsing fails. 837 * Ref: PROTOS #2412 838 */ 839 hname.slen = 0; 834 840 835 841 /* Get hname. */ … … 914 920 if (parsing_headers) 915 921 err_info->hname = hname; 922 else if (msg && msg->type == PJSIP_REQUEST_MSG) 923 err_info->hname = pj_str("Request Line"); 924 else if (msg && msg->type == PJSIP_RESPONSE_MSG) 925 err_info->hname = pj_str("Status Line"); 916 926 else 917 927 err_info->hname.slen = 0; … … 1126 1136 pj_bool_t parse_params) 1127 1137 { 1138 /* Bug: 1139 * This function should not call back int_parse_name_addr() because 1140 * it is called by that function. This would cause stack overflow 1141 * with PROTOS test #1223. 1128 1142 if (*scanner->curptr=='"' || *scanner->curptr=='<') { 1129 1143 return (pjsip_uri*)int_parse_name_addr( scanner, pool ); 1130 1144 } else { 1145 */ 1131 1146 pj_str_t scheme; 1132 1147 int colon; … … 1148 1163 UNREACHED({ return NULL; /* Not reached. */ }) 1149 1164 } 1150 } 1165 1166 /* 1167 } 1168 */ 1151 1169 } 1152 1170
Note: See TracChangeset
for help on using the changeset viewer.