All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Tinguely <tinguely@sgi.com>
To: Eric Sandeen <sandeen@redhat.com>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH 9/9] xfsdump: fix uninit ackstr in content_mediachange_query()
Date: Thu, 13 Nov 2014 12:10:01 -0600	[thread overview]
Message-ID: <5464F3F9.10305@sgi.com> (raw)
In-Reply-To: <1415818638-32700-10-git-send-email-sandeen@redhat.com>

On 11/12/14 12:57, Eric Sandeen wrote:
> Today, this sends an uninitialized ackstr[0] to be mlog'd -
> who knows what we get out of it.  Other places follow this
> "count = 0, string = "\n"" pattern which seemsa bit odd, but
> better than printing uninitialized memory.
>
> To be completely honest, I have no test for this.
>
> Signed-off-by: Eric Sandeen<sandeen@redhat.com>
> ---
>   restore/content.c |    1 +
>   1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/restore/content.c b/restore/content.c
> index c99aed7..bc5b398 100644
> --- a/restore/content.c
> +++ b/restore/content.c
> @@ -2915,6 +2915,7 @@ content_mediachange_query( void )
>   			bagp = 0;
>   		}
>   		ackcnt = 0;
> +		ackstr[ ackcnt++ ] = "\n";
>   		dlog_multi_ack( ackstr,
>   				ackcnt );
>   		querycnt = 0;

dlog_multi_ack() with count of 0 will exit without doing anything.

Looks like some conditional code that filled the ackstr array (like the 
other callers) was removed. I vote to pull ackstr, ackcnt and the 
dlog_multi_ack() from this function.

--Mark.

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  reply	other threads:[~2014-11-13 18:10 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-12 18:57 [PATCH 0/9] Random xfsdump fixes Eric Sandeen
2014-11-12 18:57 ` [PATCH 1/9] xfsdump: don't try to close fd from failed open Eric Sandeen
2014-11-12 18:57 ` [PATCH 2/9] xfsdump: Fix overflow of "question" string in Media_prompt_erase() Eric Sandeen
2014-11-12 18:58   ` Christoph Hellwig
2014-11-12 19:05   ` [PATCH 2/9 V2] " Eric Sandeen
2014-11-13 17:38     ` Christoph Hellwig
2014-11-13 18:00       ` Eric Sandeen
2014-11-12 18:57 ` [PATCH 3/9] xfsdump: fix wrong test for hard stack limit change failure Eric Sandeen
2014-11-12 18:57 ` [PATCH 4/9] xfsdump: remove pointless if (dirty); Eric Sandeen
2014-11-13 17:35   ` Mark Tinguely
2014-11-13 17:47     ` Eric Sandeen
2014-11-13 19:02       ` Mark Tinguely
2014-11-12 18:57 ` [PATCH 5/9] xfsdump: remove some unreachable code Eric Sandeen
2014-11-12 18:57 ` [PATCH 6/9] xfsdump: free suboptstrs if mlog_init1 fails Eric Sandeen
2014-11-12 18:57 ` [PATCH 7/9] xfsdump: free allocated persistent paths Eric Sandeen
2014-11-12 18:57 ` [PATCH 8/9] xfsdump: children[] is an array of child pointers, not of child structures Eric Sandeen
2014-11-12 18:57 ` [PATCH 9/9] xfsdump: fix uninit ackstr in content_mediachange_query() Eric Sandeen
2014-11-13 18:10   ` Mark Tinguely [this message]
2014-11-13 19:23     ` Eric Sandeen

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=5464F3F9.10305@sgi.com \
    --to=tinguely@sgi.com \
    --cc=sandeen@redhat.com \
    --cc=xfs@oss.sgi.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.