Fix scan-build warnings: memory accesses
These should all be ok.
router_get_hash_impl_helper:
- if (start != s && *(start-1) != '\n') {
+ if (start > s && *(start-1) != '\n') {
read_escaped_data: This is just a false positive, we should add ignore comments:
if (n_to_copy && *(next-1) == '\r')
format_win_cmdline_argument: These are just false positives, we should add ignore comments around the trailing quote and terminator assignments:
formatted_arg[i++] = '"';
formatted_arg[i] = '\0';
unescape_string: These are just false positives, we should add ignore comments:
*out++ = *cp++;
*out++ = cp[1];
*out++ = (char)n;
*out++ = ((x1<<4) + x2);
case 'n': *out++ = '\n'; cp += 2; break;
case 'r': *out++ = '\r'; cp += 2; break;
case 't': *out++ = '\t'; cp += 2; break;
*out = '\0';
tor_escape_str_for_pt_args: These are just false positives, we should add ignore comments:
*new_cp = '\0'; /* NUL-terminate the new string */
*new_cp++ = *string++;
process_environment_make: This is just a false positive, we should add ignore comments:
memcpy(cp, s, slen+1);