[Parted-commits] GNU Parted Official Repository: Changes to 'master'
Jim Meyering
meyering at alioth.debian.org
Thu Mar 5 17:37:54 UTC 2009
libparted/arch/linux.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 855941570a4f0f173822e98d8437943c43643b5a
Author: Karel Zak <kzak at redhat.com>
Date: Thu Mar 5 18:34:47 2009 +0100
test correctly for snprintf failure
* libparted/arch/linux.c (_device_get_partition_range): Correct
test for failed snprintf.
diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c
index 724df46..047ed50 100644
--- a/libparted/arch/linux.c
+++ b/libparted/arch/linux.c
@@ -2279,7 +2279,7 @@ _device_get_partition_range(PedDevice* dev)
r = snprintf(path, sizeof(path), "/sys/block/%s/range",
basename(dev->path));
- if(r < 0 || r > sizeof(path))
+ if(r < 0 || r >= sizeof(path))
return MAX_NUM_PARTS;
fp = fopen(path, "r");
More information about the Parted-commits
mailing list