Changeset 5697 for pjproject/trunk/pjlib-util/src/pjlib-util/cli.c
- Timestamp:
- Nov 17, 2017 4:07:43 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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
Note: See TracChangeset
for help on using the changeset viewer.