Fix crash with absurdly but not impossibly deeply nested device stacks
Use the proper PATH_MAX for the max path for disk util, and use
snprintf() to avoid potentially overwriting it.
Modified by Jens to return NULL instead of exiting.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
diff --git a/diskutil.h b/diskutil.h
index b89aacc..ddd6471 100644
--- a/diskutil.h
+++ b/diskutil.h
@@ -42,7 +42,7 @@
char *name;
char *sysfs_root;
- char path[256];
+ char path[PATH_MAX];
int major, minor;
struct disk_util_stat dus;