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
Copy file name to clipboardExpand all lines: diagnose.c
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -332,7 +332,7 @@ int create_diagnostics_archive(struct repository *r,
332
332
res=error_errno(_("could not read '%s'"), path.buf);
333
333
goto diagnose_cleanup;
334
334
}
335
-
strvec_push(&archiver_args, buf.buf);
335
+
strvec_push(&archiver_args, 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
if (!strcmp(actionstr, "nowarn"))// 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
1239
1239
*action=quoted_cr_nowarn;
1240
-
elseif (!strcmp(actionstr, "warn"))
1240
+
elseif (!strcmp(actionstr, "warn"))// 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
1241
1241
*action=quoted_cr_warn;
1242
-
elseif (!strcmp(actionstr, "strip"))
1242
+
elseif (!strcmp(actionstr, "strip"))// 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
strbuf_setlen(&buffer, strcspn(buffer.buf, "\r\n"));// 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: sequencer.c
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -2969,7 +2969,7 @@ static int have_finished_the_last_pick(void)
2969
2969
}
2970
2970
}
2971
2971
/* If there is only one line then we are done */
2972
-
eol=strchr(buf.buf, '\n');
2972
+
eol=strchr(buf.buf, '\n');// 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
2973
2973
if (!eol|| !eol[1])
2974
2974
ret=1;
2975
2975
@@ -3202,9 +3202,9 @@ static int read_populate_opts(struct replay_opts *opts)
3202
3202
3203
3203
if (read_oneliner(&buf, rebase_path_allow_rerere_autoupdate(),
3204
3204
READ_ONELINER_SKIP_IF_EMPTY)) {
3205
-
if (!strcmp(buf.buf, "--rerere-autoupdate"))
3205
+
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
3208
3208
opts->allow_rerere_auto=RERERE_NOAUTOUPDATE;
3209
3209
strbuf_reset(&buf);
3210
3210
}
@@ -3249,7 +3249,7 @@ static int read_populate_opts(struct replay_opts *opts)
3249
3249
READ_ONELINER_SKIP_IF_EMPTY)) {
3250
3250
constchar*p=ctx->current_fixups.buf;
3251
3251
ctx->current_fixup_count=1;
3252
-
while ((p=strchr(p, '\n'))) {
3252
+
while ((p=strchr(p, '\n'))) {// 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