Changeset 2433 for pjproject/trunk
- Timestamp:
- Jan 28, 2009 2:17:14 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/test-pjsip/msg_test.c
r2428 r2433 825 825 char *hname; 826 826 char *hshort_name; 827 char hcontent[1024];827 char *hcontent; 828 828 int (*test)(pjsip_hdr*); 829 829 unsigned flags; … … 1735 1735 pjsip_hdr *parsed_hdr1=NULL, *parsed_hdr2=NULL; 1736 1736 char *input, *output; 1737 #if defined(PJSIP_UNESCAPE_IN_PLACE) && PJSIP_UNESCAPE_IN_PLACE!=0 1738 static char hcontent[1024]; 1739 #else 1740 char *hcontent; 1741 #endif 1737 1742 int rc; 1738 1743 … … 1742 1747 hname = pj_str(test->hname); 1743 1748 len = strlen(test->hcontent); 1749 #if defined(PJSIP_UNESCAPE_IN_PLACE) && PJSIP_UNESCAPE_IN_PLACE!=0 1750 PJ_ASSERT_RETURN(len < sizeof(hcontent), PJSIP_EMSGTOOLONG); 1751 strcpy(hcontent, test->hcontent); 1752 #else 1753 hcontent = test->hcontent; 1754 #endif 1755 1744 1756 parsed_hdr1 = (pjsip_hdr*) pjsip_parse_hdr(pool, &hname, 1745 test->hcontent, len,1757 hcontent, len, 1746 1758 &parsed_len); 1747 1759 if (parsed_hdr1 == NULL) { … … 1766 1778 hname = pj_str(test->hshort_name); 1767 1779 len = strlen(test->hcontent); 1768 parsed_hdr2 = (pjsip_hdr*) pjsip_parse_hdr(pool, &hname, test->hcontent, len, &parsed_len); 1780 #if defined(PJSIP_UNESCAPE_IN_PLACE) && PJSIP_UNESCAPE_IN_PLACE!=0 1781 PJ_ASSERT_RETURN(len < sizeof(hcontent), PJSIP_EMSGTOOLONG); 1782 strcpy(hcontent, test->hcontent); 1783 #else 1784 hcontent = test->hcontent; 1785 #endif 1786 1787 parsed_hdr2 = (pjsip_hdr*) pjsip_parse_hdr(pool, &hname, hcontent, len, &parsed_len); 1769 1788 if (parsed_hdr2 == NULL) { 1770 1789 PJ_LOG(3,(THIS_FILE, " error parsing header %s: %s", test->hshort_name, test->hcontent));
Note: See TracChangeset
for help on using the changeset viewer.