Changeset 5697
- Timestamp:
- Nov 17, 2017 4:07:43 AM (7 years ago)
- Location:
- pjproject/trunk
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjlib-util/include/pjlib-util/cli.h
r4537 r5697 401 401 * register it to the CLI application. 402 402 * 403 * Note that the input string MUST be NULL terminated. 404 * 403 405 * @param cli The CLI application. 404 406 * @param group Optional group to which this command will be added … … 406 408 * command. 407 409 * @param xml Input string containing XML node text for the 408 * command .410 * command, MUST be NULL terminated. 409 411 * @param handler Function handler for the command. This must be NULL 410 412 * if the command specifies a command group. -
pjproject/trunk/pjlib-util/include/pjlib-util/xml.h
r3553 r5697 74 74 * be included in the resulted XML node tree. 75 75 * 76 * Note that the XML message input buffer MUST be NULL terminated and have 77 * length at least len+1 (len MUST NOT include the NULL terminator). 78 * 76 79 * @param pool Pool to allocate memory from. 77 * @param msg The XML message to parse .78 * @param len The length of the message .80 * @param msg The XML message to parse, MUST be NULL terminated. 81 * @param len The length of the message, not including NULL terminator. 79 82 * 80 83 * @return XML root node, or NULL if the XML document can not be parsed. -
pjproject/trunk/pjlib-util/src/pjlib-util/cli.c
r4825 r5697 695 695 PJ_USE_EXCEPTION; 696 696 697 /* The buffer passed to the scanner is not NULL terminated, 698 * but should be safe. See ticket #2063. 699 */ 697 700 pj_scan_init(&scanner, attr->value.ptr, attr->value.slen, 698 701 PJ_SCAN_AUTOSKIP_WS, &on_syntax_error); … … 723 726 } 724 727 PJ_END; 725 728 729 pj_scan_fini(&scanner); 730 726 731 } else if (!pj_stricmp2(&attr->name, "desc")) { 727 732 pj_strdup(cli->pool, &cmd->desc, &attr->value); … … 861 866 pj_cli_exec_info_default(info); 862 867 863 /* Set the parse mode based on the latest char. */ 868 /* Set the parse mode based on the latest char. 869 * And NULL terminate the buffer for the scanner. 870 */ 864 871 len = pj_ansi_strlen(cmdline); 865 872 if (len > 0 && ((cmdline[len - 1] == '\r')||(cmdline[len - 1] == '\n'))) { … … 931 938 } 932 939 PJ_END; 940 941 pj_scan_fini(&scanner); 933 942 } 934 943 -
pjproject/trunk/pjlib-util/src/pjlib-util/cli_telnet.c
r5647 r5697 972 972 } 973 973 PJ_END; 974 975 pj_scan_fini(&scanner); 974 976 return PJ_SUCCESS; 975 977 } … … 1333 1335 PJ_END; 1334 1336 1337 pj_scan_fini(&scanner); 1335 1338 return PJ_SUCCESS; 1336 1339 } -
pjproject/trunk/pjlib-util/src/pjlib-util/scanner.c
r5695 r5697 128 128 scanner->skip_ws = options; 129 129 130 /* Buffer validation. Must be NULL terminated.131 * See ticket #2063.132 */133 // pj_assert(*(scanner->end) == 0);134 135 130 if (scanner->skip_ws) 136 131 pj_scan_skip_whitespace(scanner); -
pjproject/trunk/pjmedia/include/pjmedia/sdp.h
r4367 r5697 646 646 * Parse SDP message. 647 647 * 648 * Note that the input message buffer MUST be NULL terminated and have 649 * length at least len+1 (len MUST NOT include the NULL terminator). 650 * 648 651 * @param pool The pool to allocate SDP session description. 649 * @param buf The message buffer .650 * @param len The length of the message .652 * @param buf The message buffer, MUST be NULL terminated. 653 * @param len The length of the message, excluding NULL terminator. 651 654 * @param p_sdp Pointer to receive the SDP session descriptor. 652 655 * -
pjproject/trunk/pjmedia/src/pjmedia/sdp.c
r5335 r5697 276 276 } 277 277 278 /* The buffer passed to the scanner is not guaranteed to be NULL 279 * terminated, but should be safe. See ticket #2063. 280 */ 278 281 pj_scan_init(&scanner, (char*)attr->value.ptr, attr->value.slen, 279 282 PJ_SCAN_AUTOSKIP_WS, &on_scanner_error); … … 386 389 */ 387 390 391 /* The buffer passed to the scanner is not guaranteed to be NULL 392 * terminated, but should be safe. See ticket #2063. 393 */ 388 394 pj_scan_init(&scanner, (char*)attr->value.ptr, attr->value.slen, 389 395 PJ_SCAN_AUTOSKIP_WS, &on_scanner_error); -
pjproject/trunk/pjsip/include/pjsip-simple/iscomposing.h
r3553 r5697 105 105 * message. 106 106 * 107 * Note that the input string buffer MUST be NULL terminated and have 108 * length at least len+1 (len MUST NOT include the NULL terminator). 109 * 107 110 * @param pool Pool to allocate memory for the parsing process. 108 * @param msg The message to be parsed .109 * @param len Length of the message .111 * @param msg The message to be parsed, MUST be NULL terminated. 112 * @param len Length of the message, excluding NULL terminator. 110 113 * @param p_is_composing Optional pointer to receive iscomposing status. 111 114 * @param p_last_active Optional pointer to receive last active attribute. -
pjproject/trunk/pjsip/include/pjsip-simple/xpidf.h
r3553 r5697 61 61 * Parse XPIDF document. 62 62 * 63 * Note that the input text buffer MUST be NULL terminated and have 64 * length at least len+1 (len MUST NOT include the NULL terminator). 65 * 63 66 * @param pool Pool. 64 * @param text Input text .65 * @param len Length of input text .67 * @param text Input text, MUST be NULL terminated. 68 * @param len Length of input text, NOT including the NULL terminator. 66 69 * 67 70 * @return XPIDF document. -
pjproject/trunk/pjsip/include/pjsip/sip_parser.h
r5693 r5697 280 280 * Check incoming packet to see if a (probably) valid SIP message has been 281 281 * received. 282 * Note that the input string buffer MUST be NULL terminated. 282 * Note that the input string buffer MUST be NULL terminated and have 283 * length at least size+1 (size MUST NOT include the NULL terminator). 283 284 * 284 285 * @param buf The input buffer, which must be NULL terminated. 285 * @param size The buffer size.286 * @param size The length of the string (not counting NULL terminator). 286 287 * @param is_datagram Put non-zero if transport is datagram oriented. 287 288 * @param msg_size [out] If message is valid, this parameter will contain -
pjproject/trunk/pjsip/src/pjsip/sip_parser.c
r5694 r5697 878 878 PJ_USE_EXCEPTION; 879 879 880 /* The buffer passed to the scanner is not NULL terminated, 881 * but should be safe. See ticket #2063. 882 */ 880 883 pj_scan_init(&scanner, (char*)line, hdr_end-line, 881 884 PJ_SCAN_AUTOSKIP_WS_HEADER, &on_syntax_error);
Note: See TracChangeset
for help on using the changeset viewer.