about summary refs log tree commit diff
path: root/tests/t0104-tree.sh
diff options
context:
space:
mode:
authorJohn Keeping <john@keeping.me.uk>2016-08-07 15:54:14 +0100
committerJohn Keeping <john@keeping.me.uk>2016-10-01 11:43:33 +0100
commit35df710a1fa21b62c5328e2c98f29a68a0312a25 (patch)
treedb984e301d72179483d6173138f2323b02b98967 /tests/t0104-tree.sh
parentgit: update to v2.10.0 (diff)
downloadcgit-pink-35df710a1fa21b62c5328e2c98f29a68a0312a25.tar.gz
cgit-pink-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/t0104-tree.sh')
0 files changed, 0 insertions, 0 deletions
cgit-pink/commit/ui-summary.c?h=1.4.1&id=1418034e642fee67c981b31e4c3eb6e8ae14e303&follow=1'>Move repo summary functions into ui-summary.cLars Hjemli 2006-12-11Move functions for repolist output into ui-repolist.cLars Hjemli 2006-12-11Move common output-functions into ui-shared.cLars Hjemli 2006-12-11Rename config.c to parsing.c + move cgit_parse_query from cgit.c to parsing.cLars Hjemli 2006-12-11Avoid infinite loops in caching layerLars Hjemli 2006-12-11Let 'make install' clear all cachefilesLars Hjemli 2006-12-11Fix cache algorithm loopholeLars Hjemli 2006-12-10Add version identifier in generated filesLars Hjemli 2006-12-10Add license file and copyright noticesLars Hjemli 2006-12-10Add caching infrastructureLars Hjemli