From: Theodore Ts'o Date: Sat, 29 Mar 2008 18:46:48 +0000 (-0400) Subject: e2fsck: Avoid core dump when using the -N option X-Git-Tag: v1.40.9~21 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a2447f8c8aaaa4732b8ab950cb29699a1ff0d694;p=thirdparty%2Fe2fsprogs.git e2fsck: Avoid core dump when using the -N option This bug was accidentally introduced by commit 1dc506cb. Signed-off-by: "Theodore Ts'o" --- diff --git a/e2fsck/unix.c b/e2fsck/unix.c index 3eb306477..d3a8a2b69 100644 --- a/e2fsck/unix.c +++ b/e2fsck/unix.c @@ -737,7 +737,7 @@ static errcode_t PRS(int argc, char *argv[], e2fsck_t *ret_ctx) break; #endif case 'N': - ctx->device_name = optarg; + ctx->device_name = string_copy(ctx, optarg, 0); break; #ifdef ENABLE_SWAPFS case 's':