* [PATCH] dmsetup: missing end of string
@ 2007-06-19 14:58 Jun'ichi Nomura
0 siblings, 0 replies; only message in thread
From: Jun'ichi Nomura @ 2007-06-19 14:58 UTC (permalink / raw)
To: dm-devel
[-- 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 --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-06-19 14:58 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-19 14:58 [PATCH] dmsetup: missing end of string Jun'ichi Nomura
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.