diff options
| author | David Gibson <david@gibson.dropbear.id.au> | 2025-04-02 15:43:40 +1100 |
|---|---|---|
| committer | Stefano Brivio <sbrivio@redhat.com> | 2025-04-02 08:29:42 +0200 |
| commit | 3d41e4d8389578e5d5f3cf2e47b9ff9cdd29ffd1 (patch) | |
| tree | 602f6a4802fa29ef514c887cc3136d9b074b6fc0 /contrib | |
| parent | dec3d73e1e8e007d05f9dce9a48aca7cb8532992 (diff) | |
| download | passt-3d41e4d8389578e5d5f3cf2e47b9ff9cdd29ffd1.tar passt-3d41e4d8389578e5d5f3cf2e47b9ff9cdd29ffd1.tar.gz passt-3d41e4d8389578e5d5f3cf2e47b9ff9cdd29ffd1.tar.bz2 passt-3d41e4d8389578e5d5f3cf2e47b9ff9cdd29ffd1.tar.lz passt-3d41e4d8389578e5d5f3cf2e47b9ff9cdd29ffd1.tar.xz passt-3d41e4d8389578e5d5f3cf2e47b9ff9cdd29ffd1.tar.zst passt-3d41e4d8389578e5d5f3cf2e47b9ff9cdd29ffd1.zip | |
passt-repair: Correct off-by-one error verifying name
passt-repair will generate an error if the name it gets from the kernel is
too long or not NUL terminated. Downstream testing has reported
occasionally seeing this error in practice.
In turns out there is a trivial off-by-one error in the check: ev->len is
the length of the name, including terminating \0 characters, so to check
for a \0 at the end of the buffer we need to check ev->name[len - 1] not
ev->name[len].
Fixes: 42a854a52b6f ("pasta, passt-repair: Support multiple events per read() in inotify handlers")
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'contrib')
0 files changed, 0 insertions, 0 deletions
