Merge branch 'js/diff-codeql-false-positive-workaround'
Work around false positive given by CodeQL. * js/diff-codeql-false-positive-workaround: diff: check range before dereferencing an array element
This commit is contained in:
2
diff.c
2
diff.c
@@ -892,7 +892,7 @@ static void fill_es_indent_data(struct emitted_diff_symbol *es)
|
|||||||
|
|
||||||
/* skip any \v \f \r at start of indentation */
|
/* skip any \v \f \r at start of indentation */
|
||||||
while (s[off] == '\f' || s[off] == '\v' ||
|
while (s[off] == '\f' || s[off] == '\v' ||
|
||||||
(s[off] == '\r' && off < len - 1))
|
(off < len - 1 && s[off] == '\r'))
|
||||||
off++;
|
off++;
|
||||||
|
|
||||||
/* calculate the visual width of indentation */
|
/* calculate the visual width of indentation */
|
||||||
|
|||||||
Reference in New Issue
Block a user