All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jun'ichi Nomura" <j-nomura@ce.jp.nec.com>
To: dm-devel@redhat.com
Subject: [PATCH] dmsetup: missing end of string
Date: Tue, 19 Jun 2007 10:58:20 -0400	[thread overview]
Message-ID: <4677EF0C.7030308@ce.jp.nec.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 270 bytes --]

Hi,

'devno' field of dmsetup info doesn't work.

# dmsetup info -c -o devno
dm_report: snprintf heading failed
dm_report: left-aligned snprintf() failed

There is a missing '\0' at the end of the copied strings.

Thanks,
-- 
Jun'ichi Nomura, NEC Corporation of America

[-- Attachment #2: dmsetup-info-missing-eos.patch --]
[-- Type: text/x-patch, Size: 468 bytes --]

Index: device-mapper.work/dmsetup/dmsetup.c
===================================================================
--- device-mapper.work.orig/dmsetup/dmsetup.c
+++ device-mapper.work/dmsetup/dmsetup.c
@@ -1629,7 +1629,7 @@ static int _dm_info_devno_disp(struct dm
 		goto out_abandon;
 	}
 
-	if (!dm_pool_grow_object(mem, buf, strlen(buf))) {
+	if (!dm_pool_grow_object(mem, buf, strlen(buf) + 1)) {
 		log_error("dm_pool_grow_object failed");
 		goto out_abandon;
 	}

[-- Attachment #3: Type: text/plain, Size: 0 bytes --]



                 reply	other threads:[~2007-06-19 14:58 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=4677EF0C.7030308@ce.jp.nec.com \
    --to=j-nomura@ce.jp.nec.com \
    --cc=dm-devel@redhat.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.