diff options
author | Junio C Hamano <gitster@pobox.com> | 2025-05-01 14:07:57 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2025-05-01 14:07:57 -0700 |
commit | a8402760328a6f9879ce40263fe306538782a5b0 (patch) | |
tree | 5a4e678b36c538e5b8ad6f41da15efd1938b46e1 | |
parent | 5c27b05f45c62536b04b42e8b6f92e2a86456c1b (diff) | |
parent | 104add8368617f80ee356ea48497364ed39a7b7a (diff) | |
download | git-next.tar.gz |
Merge branch 'js/diff-codeql-false-positive-workaround' into nextnext
Work around false positive given by CodeQL.
* js/diff-codeql-false-positive-workaround:
diff: check range before dereferencing an array element
-rw-r--r-- | diff.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -892,7 +892,7 @@ static void fill_es_indent_data(struct emitted_diff_symbol *es) /* skip any \v \f \r at start of indentation */ while (s[off] == '\f' || s[off] == '\v' || - (s[off] == '\r' && off < len - 1)) + (off < len - 1 && s[off] == '\r')) off++; /* calculate the visual width of indentation */ |