Yes, you are right. The better solution would be to put quotes around
it.
I am modifying the cmdline to include a set of quotes around
cmdline[11] which holds the nameservers. This works as far as
allowing the resolv.conf to be correctly created. However, the
quoations are getting prepended to one nameserver and appended to the
other like this:
nameserver "10.4.21.10
nameserver 10.4.21.11"
I have tried with both single and double quotes. Perhaps I am doing
something wrong but shouldn't 'getopt' be filtering these out?
Regards,
Nick
On Mon, 1 Nov 2004 19:22:36 +0200, Anders Johansson
On Monday, 1 November 2004 17.54, Nicholas DeClario wrote:
- sprintf(NameserverList + strlen(NameserverList), "%u.%u.%u.%u", + sprintf(NameserverList + strlen(NameserverList), "%u.%u.%u.%u -n ",
If that's the only change you made, it will generate a buffer overflow. Look at how much memory is malloced for that string
However, I think the correct solution is to put quotes around the argument, so it's -n "1.2.3.4 2.3.4.5"
-- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com