lists.zerezo.com
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Samba] [3.2.0] Off by one error
- Date: Wed, 2 Jul 2008 16:27:47 -0700
- From: Jeremy Allison <jra@xxxxxxxxx>
- Subject: Re: [Samba] [3.2.0] Off by one error
On Wed, Jul 02, 2008 at 06:46:50PM -0400, James Kosin wrote:
> I'll have to get back to you later on the backtrace gdb is broken on my
> machine.
> It is 100% reproducable by including an interfaces line with the IP and
> mask as the parameter. And only happens on startup when nmbd is loading
> the configuration. If I change the interfaces line to read just the single
> IP without the mask all is fine.
> I'll check to see if this was a change to how the interface line is
> specified or a problem that has always been there. And wasn't caught until
> safe-copy was used.
>
> interfaces 192.168.100.20/24
> breaks the nmdb with an error; but doesn't stop nmdb.
> interfaces 192.168.100.20
> works and no error is reported.
Ok, I've found it. It's a warning, not an error.
We've correctly set up the interface here but
we're just trying to set the interface name.
It happens here lib/interface.c:
472 safe_strcpy(ifs.name, token, sizeof(ifs.name)-1);
Where token is set to "192.168.100.20/24" which is greater
than ifs.name. We've already parsed out the values for
ss, ss_mask and ss_bcast we're just trying to give the
pseudo interface a name.
I'll replace this with strlcpy and it should be fine.
Thanks for the report though !
Jeremy.
--
To unsubscribe from this list go to the following URL and read the
instructions: https://lists.samba.org/mailman/listinfo/samba