You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (!strcmp(sb.buf, "t"))// CodeQL [SM01932] justification: CodeQL is wrong here because the value is read from a file via strbuf_read() which does NUL-terminate the string, something CodeQL fails to understand
438
438
state->keep=KEEP_TRUE;
439
-
elseif (!strcmp(sb.buf, "b"))
439
+
elseif (!strcmp(sb.buf, "b"))// CodeQL [SM01932] justification: CodeQL is wrong here because the value is read from a file via strbuf_read() which does NUL-terminate the string, something CodeQL fails to understand
440
440
state->keep=KEEP_NON_PATCH;
441
441
else
442
442
state->keep=KEEP_FALSE;
443
443
444
444
read_state_file(&sb, state, "messageid", 1);
445
-
state->message_id= !strcmp(sb.buf, "t");
445
+
state->message_id= !strcmp(sb.buf, "t");// CodeQL [SM01932] justification: CodeQL is wrong here because the value is read from a file via strbuf_read() which does NUL-terminate the string, something CodeQL fails to understand
446
446
447
447
read_state_file(&sb, state, "scissors", 1);
448
-
if (!strcmp(sb.buf, "t"))
448
+
if (!strcmp(sb.buf, "t"))// CodeQL [SM01932] justification: CodeQL is wrong here because the value is read from a file via strbuf_read() which does NUL-terminate the string, something CodeQL fails to understand
449
449
state->scissors=SCISSORS_TRUE;
450
-
elseif (!strcmp(sb.buf, "f"))
450
+
elseif (!strcmp(sb.buf, "f"))// CodeQL [SM01932] justification: CodeQL is wrong here because the value is read from a file via strbuf_read() which does NUL-terminate the string, something CodeQL fails to understand
elseif (mailinfo_parse_quoted_cr_action(sb.buf, &state->quoted_cr) !=0)// CodeQL [SM01932] justification: CodeQL is wrong here because the value is read from a file via strbuf_read() which does NUL-terminate the string, something CodeQL fails to understand
459
459
die(_("could not parse %s"), am_path(state, "quoted-cr"));
460
460
461
461
read_state_file(&sb, state, "apply-opt", 1);
462
462
strvec_clear(&state->git_apply_opts);
463
-
if (sq_dequote_to_strvec(sb.buf, &state->git_apply_opts) <0)
463
+
if (sq_dequote_to_strvec(sb.buf, &state->git_apply_opts) <0)// CodeQL [SM01932] justification: CodeQL is wrong here because the value is read from a file via strbuf_read() which does NUL-terminate the string, something CodeQL fails to understand
464
464
die(_("could not parse %s"), am_path(state, "apply-opt"));
if (len!=8||strncmp(signature, "gitdir: ", 8))// CodeQL [SM01932] justification: CodeQL is wrong here because the value is read from a file via strbuf_read() which does NUL-terminate the string, something CodeQL fails to understand
Copy file name to clipboardExpand all lines: builtin/commit.c
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -2086,7 +2086,7 @@ int cmd_commit(int argc,
2086
2086
if (!stat(git_path_merge_mode(the_repository), &statbuf)) {
2087
2087
if (strbuf_read_file(&sb, git_path_merge_mode(the_repository), 0) <0)
2088
2088
die_errno(_("could not read MERGE_MODE"));
2089
-
if (!strcmp(sb.buf, "no-ff"))
2089
+
if (!strcmp(sb.buf, "no-ff"))// CodeQL [SM01932] justification: CodeQL is wrong here because the value is read from a file via strbuf_read() which does NUL-terminate the string, something CodeQL fails to understand
Copy file name to clipboardExpand all lines: builtin/rebase.c
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -483,9 +483,9 @@ static int read_basic_state(struct rebase_options *opts)
483
483
if (!read_oneliner(&buf, state_dir_path("allow_rerere_autoupdate", opts),
484
484
READ_ONELINER_WARN_MISSING))
485
485
return-1;
486
-
if (!strcmp(buf.buf, "--rerere-autoupdate"))
486
+
if (!strcmp(buf.buf, "--rerere-autoupdate"))// CodeQL [SM01932] justification: CodeQL is wrong here because the value is read from a file via strbuf_read() which does NUL-terminate the string, something CodeQL fails to understand
elseif (!strcmp(buf.buf, "--no-rerere-autoupdate"))// CodeQL [SM01932] justification: CodeQL is wrong here because the value is read from a file via strbuf_read() which does NUL-terminate the string, something CodeQL fails to understand
if (!strcmp(line, bundle_sigs[i].signature)) {// CodeQL [SM01932] justification: CodeQL is wrong here because the value is read from a file via strbuf_read() which does NUL-terminate the string, something CodeQL fails to understand
70
70
header->version=bundle_sigs[i].version;
71
71
return0;
72
72
}
@@ -82,7 +82,7 @@ int read_bundle_header_fd(int fd, struct bundle_header *header,
82
82
83
83
/* The bundle header begins with the signature */
84
84
if (strbuf_getwholeline_fd(&buf, fd, '\n') ||
85
-
parse_bundle_signature(header, buf.buf)) {
85
+
parse_bundle_signature(header, buf.buf)) {// CodeQL [SM01932] justification: CodeQL is wrong here because the value is read from a file via strbuf_read() which does NUL-terminate the string, something CodeQL fails to understand
86
86
if (report_path)
87
87
error(_("'%s' does not look like a v2 or v3 bundle file"),
returnxstrdup(r);// CodeQL [SM01932] justification: CodeQL is wrong here because the value is read from a file via strbuf_read() which does NUL-terminate the string, something CodeQL fails to understand
0 commit comments