public inbox for util-linux@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrey Vagin <avagin@openvz.org>
To: util-linux@vger.kernel.org
Cc: Karel Zak <kzak@redhat.com>, Andrew Vagin <avagin@openvz.org>
Subject: [PATCH] hexdump: initialize hex->skip
Date: Fri, 27 Dec 2013 17:44:48 +0400	[thread overview]
Message-ID: <1388151888-8999-1-git-send-email-avagin@openvz.org> (raw)

From: Andrew Vagin <avagin@openvz.org>

==11097== Conditional jump or move depends on uninitialised value(s)
==11097==    at 0x9588: next (hexdump-display.c:355)
==11097==    by 0x9767: display (hexdump-display.c:280)
==11097==    by 0x9227: main (hexdump.c:198)

Signed-off-by: Andrew Vagin <avagin@openvz.org>
---
 text-utils/hexdump.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/text-utils/hexdump.c b/text-utils/hexdump.c
index e9fca02..1806077 100644
--- a/text-utils/hexdump.c
+++ b/text-utils/hexdump.c
@@ -169,6 +169,7 @@ int main(int argc, char **argv)
 
 	struct hexdump *hex = malloc (sizeof (struct hexdump));
 	hex->length = -1;
+	hex->skip = 0;
 	INIT_LIST_HEAD(&hex->fshead);
 
 	setlocale(LC_ALL, "");
-- 
1.8.4.2


             reply	other threads:[~2013-12-27 13:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-27 13:44 Andrey Vagin [this message]
2014-01-06 12:56 ` [PATCH] hexdump: initialize hex->skip Karel Zak

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=1388151888-8999-1-git-send-email-avagin@openvz.org \
    --to=avagin@openvz.org \
    --cc=kzak@redhat.com \
    --cc=util-linux@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