In article <0f10b5dc-7504-a92a-824d-ecc091b00...@thekelleys.org.uk>,
           Simon Kelley<si...@thekelleys.org.uk> wrote:
> 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
> three times.
> 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.

Is it possible for in->len to be zero? The man page for inotify does say the
name is optional, so I assumed that this was what that test was checking

I'll take a look at your version of the code in git and see how it looks
compared to mine.



Dnsmasq-discuss mailing list

Reply via email to