diff --git a/usermin/export_mod.cgi b/usermin/export_mod.cgi index 076ee7f98..b6c74e89c 100755 --- a/usermin/export_mod.cgi +++ b/usermin/export_mod.cgi @@ -29,9 +29,10 @@ if ($in{'to'} == 0) { # Output the file print "Content-type: application/octet-stream\n\n"; open(TEMP, $temp); - while() { - print $_; - } + my $buf; + while(read(TEMP, $buf, 32768)) { + print $buf; + } close(TEMP); unlink($temp); } diff --git a/webmin/export_mod.cgi b/webmin/export_mod.cgi index 063702865..3e75e5bb2 100755 --- a/webmin/export_mod.cgi +++ b/webmin/export_mod.cgi @@ -27,8 +27,9 @@ if ($in{'to'} == 0) { # Output the file print "Content-type: application/x-gzip\n\n"; open(TEMP, $temp); - while() { - print $_; + my $buf; + while(read(TEMP, $buf, 32768)) { + print $buf; } close(TEMP); unlink($temp);