diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2005-09-30 05:07:11 +0000 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2005-09-30 05:07:11 +0000 |
commit | 86b4df4f0d25360092638ee24043fef449257774 (patch) | |
tree | 935668c55f290db51253afa2cdea27d347b2ff29 /src | |
parent | a93720f8ac342a57cf3221629ba7dc5ef157f2db (diff) | |
download | coreutils-86b4df4f0d25360092638ee24043fef449257774.tar.xz |
(main): Don't assume size_t has the same width
as unsigned long. Problem reported by Eric Blake.
Diffstat (limited to 'src')
-rw-r--r-- | src/dd.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1652,13 +1652,14 @@ main (int argc, char **argv) if (seek_records != 0 && !(conversions_mask & C_NOTRUNC)) { uintmax_t size = seek_records * output_blocksize; + unsigned long int obs = output_blocksize; if (OFF_T_MAX / output_blocksize < seek_records) error (EXIT_FAILURE, 0, _("offset too large: " "cannot truncate to a length of seek=%"PRIuMAX"" " (%lu-byte) blocks"), - seek_records, output_blocksize); + seek_records, obs); if (ftruncate (STDOUT_FILENO, size) != 0) { |