Patch applied, with two modifications.
1) I added a check for strlen(in->name) not being zero. I don't know if
inotify could give us a zero-length filename, but if it did, we'd make
an out-of-bounds array reference to in->name[-1]. I also saved the
return from strlen(in->name) in a variable, rather than call strlen
2) Move the resolv-file test to after the dotfiles test. Only relevant
if someone configures a resolv file name which looks like an editor
backup file, but at least in's consistent. Also allows removal of a
now-redundant in->len == 0 test.
On 13/02/18 09:40, Andy Hawkins wrote:
> Use strlen to determine the length of the filename returned by
> inotify, as in->len refers to the length of the buffer containing
> the name, not the length of the name itself.
> Signed-off-by: Andy Hawkins <a...@gently.org.uk>
Dnsmasq-discuss mailing list