From 630161f2715af033667a1398c9f1d2b87eaf61f9 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 17 Jun 2010 10:57:47 +0200 Subject: [PATCH] mkswap: don't use too small user-specified page size Addresses: http://bugzilla.redhat.com/show_bug.cgi?id=601552 Signed-off-by: Karel Zak --- disk-utils/mkswap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/disk-utils/mkswap.c b/disk-utils/mkswap.c index 25a920ad..93378076 100644 --- a/disk-utils/mkswap.c +++ b/disk-utils/mkswap.c @@ -153,7 +153,7 @@ init_signature_page(void) { if (user_pagesize) { if ((user_pagesize & (user_pagesize-1)) || - user_pagesize < 1024) { + user_pagesize < sizeof(struct swap_header_v1_2) + 10) { fprintf(stderr, _("Bad user-specified page size %d\n"), user_pagesize); exit(1); -- 2.39.5