public inbox for linux-nfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Steve Dickson <SteveD@redhat.com>
To: Steve Dickson <steved@redhat.com>
Cc: Linux NFS Mailing List <linux-nfs@vger.kernel.org>
Subject: Re: [PATCH] rpc.idmapd: Sections in idmapd.conf are ignored.
Date: Mon, 14 Nov 2011 16:11:39 -0500	[thread overview]
Message-ID: <4EC1840B.5080800@RedHat.com> (raw)
In-Reply-To: <1321283020-15730-1-git-send-email-steved@redhat.com>



On 11/14/2011 10:03 AM, Steve Dickson wrote:
> In the parsing routine, conf_parse_line(), a string
> is not being null terminated which is causing
> section of the config file to be ignored.
> 
> https://bugzilla.linux-nfs.org/show_bug.cgi?id=205
> 
> Signed-off-by: Steve Dickson <steved@redhat.com>
Committed...

steved.

> ---
>  support/nfs/conffile.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/support/nfs/conffile.c b/support/nfs/conffile.c
> index fa0dc6b..3990578 100644
> --- a/support/nfs/conffile.c
> +++ b/support/nfs/conffile.c
> @@ -256,13 +256,14 @@ conf_parse_line(int trans, char *line, size_t sz)
>  			val++, j++;
>  		if (*val)
>  			i = j;
> -		section = malloc(i);
> +		section = malloc(i+1);
>  		if (!section) {
>  			xlog_warn("conf_parse_line: %d: malloc (%lu) failed", ln,
>  						(unsigned long)i);
>  			return;
>  		}
>  		strncpy(section, line, i);
> +		section[i] = '\0';
>  
>  		if (arg) 
>  			free(arg);

      parent reply	other threads:[~2011-11-14 21:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-14 15:03 [PATCH] rpc.idmapd: Sections in idmapd.conf are ignored Steve Dickson
2011-11-14 17:44 ` Jim Rees
2011-11-14 18:02   ` Steve Dickson
2011-11-14 21:11 ` Steve Dickson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4EC1840B.5080800@RedHat.com \
    --to=steved@redhat.com \
    --cc=linux-nfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox