2021-09-26
| * | Use tiny UTF-8-aware col -b replacement | June McEnroe | 2021-09-26 |
| * | Install up to cgi-bin | June McEnroe | 2021-09-25 |
| * | Clean up up (ugh) somewhat again | June McEnroe | 2021-09-25 |
| * | Sandbox up on both FreeBSD and OpenBSD | June McEnroe | 2021-09-25 |
| * | Make up build away from FreeBSD | June McEnroe | 2021-09-23 |
| * | Call sandbox in CGI mode | June McEnroe | 2021-09-22 |
| * | Support HTTP PUT in up | June McEnroe | 2021-09-22 | 2016-01-16 11:03:07 +0000 |
| committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2016-01-17 17:05:39 +0100 |
| commit | 33bc949a1e927e14479568518bd92e70998e25f8 (patch) |
| tree | 4b31bd761caeea599aad3dad07d39341a900a112 /tests/valgrind/bin/cgit |
| parent | cache: use size_t for string lengths (diff) |
|---|
| download | cgit-pink-33bc949a1e927e14479568518bd92e70998e25f8.tar.gz cgit-pink-33bc949a1e927e14479568518bd92e70998e25f8.zip
|
cache: don't check for match with no key
We call open_slot() from cache_ls() without a key since we simply want
to read the path out of the header. Should the file happen to contain
an empty key then we end up calling memcmp() with NULL and a non-zero
length. Fix this by assigning slot->match only if a key is set, which
is always will be in the code paths where we use slot->match.
Coverity-id: 13807
Signed-off-by: John Keeping <john@keeping.me.uk>