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
@@ -1875,7 +1875,7 @@ int cmd_commit(int argc,
1875
1875
if (!stat(git_path_merge_mode(the_repository), &statbuf)) {
1876
1876
if (strbuf_read_file(&sb, git_path_merge_mode(the_repository), 0) <0)
1877
1877
die_errno(_("could not read MERGE_MODE"));
1878
-
if (!strcmp(sb.buf, "no-ff"))
1878
+
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
@@ -482,9 +482,9 @@ static int read_basic_state(struct rebase_options *opts)
482
482
if (!read_oneliner(&buf, state_dir_path("allow_rerere_autoupdate", opts),
483
483
READ_ONELINER_WARN_MISSING))
484
484
return-1;
485
-
if (!strcmp(buf.buf, "--rerere-autoupdate"))
485
+
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
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
1242
1242
*action=quoted_cr_nowarn;
1243
-
elseif (!strcmp(actionstr, "warn"))
1243
+
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
1244
1244
*action=quoted_cr_warn;
1245
-
elseif (!strcmp(actionstr, "strip"))
1245
+
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
@@ -2960,7 +2960,7 @@ static int have_finished_the_last_pick(void)
2960
2960
}
2961
2961
}
2962
2962
/* If there is only one line then we are done */
2963
-
eol=strchr(buf.buf, '\n');
2963
+
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
2964
2964
if (!eol|| !eol[1])
2965
2965
ret=1;
2966
2966
@@ -3193,9 +3193,9 @@ static int read_populate_opts(struct replay_opts *opts)
3193
3193
3194
3194
if (read_oneliner(&buf, rebase_path_allow_rerere_autoupdate(),
3195
3195
READ_ONELINER_SKIP_IF_EMPTY)) {
3196
-
if (!strcmp(buf.buf, "--rerere-autoupdate"))
3196
+
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
3199
3199
opts->allow_rerere_auto=RERERE_NOAUTOUPDATE;
3200
3200
strbuf_reset(&buf);
3201
3201
}
@@ -3240,7 +3240,7 @@ static int read_populate_opts(struct replay_opts *opts)
3240
3240
READ_ONELINER_SKIP_IF_EMPTY)) {
3241
3241
constchar*p=ctx->current_fixups.buf;
3242
3242
ctx->current_fixup_count=1;
3243
-
while ((p=strchr(p, '\n'))) {
3243
+
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
strvec_push_nodup(array, xstrdup(value));// 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