diff options
author | Patrick Steinhardt <ps@pks.im> | 2018-10-29 17:25:09 +0100 |
---|---|---|
committer | Patrick Steinhardt <ps@pks.im> | 2018-11-02 13:31:09 +0100 |
commit | f647bbc88d243a81d8771ba2fd1c346c34a3d9d7 (patch) | |
tree | ae16bc119688467c78fef5d89579f2a9fb987972 /src/commit.c | |
parent | d4ad658a6917de6853088a811d058a64f070c217 (diff) | |
download | libgit2-f647bbc88d243a81d8771ba2fd1c346c34a3d9d7.tar.gz |
tree: fix mode parsing reading out-of-bounds
When parsing a tree entry's mode, we will eagerly parse until we hit a
character that is not in the accepted set of octal digits '0' - '7'. If
the provided buffer is not a NUL terminated one, we may thus read
out-of-bounds.
Fix the issue by passing the buffer length to `parse_mode` and paying
attention to it. Note that this is not a vulnerability in our usual code
paths, as all object data read from the ODB is NUL terminated.
Diffstat (limited to 'src/commit.c')
0 files changed, 0 insertions, 0 deletions