diff -urN fsarchiver-0.6.2-orig/src/fsarchiver.c fsarchiver-0.6.2-patch/src/fsarchiver.c --- fsarchiver-0.6.2-orig/src/fsarchiver.c 2009-12-07 20:20:16.000000000 +0000 +++ fsarchiver-0.6.2-patch/src/fsarchiver.c 2009-12-21 15:04:41.000000000 +0000 @@ -199,6 +199,7 @@ sigset_t mask_set; char *probemode; bool probedetailed=0; + char tempbuf[512]; char *command=NULL; char *archive=NULL; char *partition[32]; @@ -266,13 +267,18 @@ } break; case 's': // split archive into several volumes - g_options.splitsize=atol(optarg)*1024*1024; + g_options.splitsize=((u64)atoll(optarg))*((u64)1024LL*1024LL); if (g_options.splitsize==0) { errprintf("argument of option -s is invalid (%s). It must be a valid integer\n", optarg); usage(progname, false); return 1; } + else // show the calculated size since it was probably incorrect before due to an integer overflow + { + msgprintf(MSG_FORCE, "Archives will be split into volumes of the following size:\n%lld bytes (%s)", + (long long)g_options.splitsize, format_size(g_options.splitsize, tempbuf, sizeof(tempbuf), 'h')); + } break; case 'z': // compression level g_options.fsacomplevel=atoi(optarg);