aboutsummaryrefslogtreecommitdiff
path: root/tests/filters/dump.lua
diff options
context:
space:
mode:
authorJohn Keeping <john@keeping.me.uk>2016-08-07 14:54:14 +0000
committerJohn Keeping <john@keeping.me.uk>2016-10-01 10:43:33 +0000
commit35df710a1fa21b62c5328e2c98f29a68a0312a25 (patch)
treedb984e301d72179483d6173138f2323b02b98967 /tests/filters/dump.lua
parent11695a58fd732689be486edf88d145578a787c89 (diff)
downloadcgit-35df710a1fa21b62c5328e2c98f29a68a0312a25.tar
cgit-35df710a1fa21b62c5328e2c98f29a68a0312a25.tar.gz
cgit-35df710a1fa21b62c5328e2c98f29a68a0312a25.zip
configfile: fix EOF handling
Currently we can end up passing EOF to isspace(), which is in fact libgit's sane_isspace which does: ((sane_ctype[(unsigned char)(x)] & (GIT_SPACE)) != 0) It is very unlikely that EOF cast to "unsigned char" will end up in a character that has the GIT_SPACE bit set, but the standard only requires that EOF be a negative integer, so it could access any value in the sane_ctype array. If it does end up returning true for isspace() then this loop will never terminate, so handle EOF as a special value in the same way as the other loops in this function. Signed-off-by: John Keeping <john@keeping.me.uk>
Diffstat (limited to 'tests/filters/dump.lua')
0 files changed, 0 insertions, 0 deletions