Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#7 Split fails when value isn't a multiple of blocksize

closed-fixed
Crash (4)
5
2008-10-07
2008-02-12
Jesse Kornblum
No

The program crashes when the argument to split is not a multiple of the blocksize. For example, if the blocksize 512 (the default), the following command line causes a crash.

$ dc3dd if=/dev/zero of=foo split=1000

The problem appears to be that the program is calling copy_simple and then write_output to write data to the disk. The latter function returns an error when the number of bytes written doesn't match the blocksize.

Discussion

  • Andrew Medico
    Andrew Medico
    2008-10-07

    Added a check on startup to verify that the split value is a multiple of the block size. If it is not, the program exits immediately with a message explaining the problem.

     
  • Andrew Medico
    Andrew Medico
    2008-10-07

    • status: open --> open-fixed
     
  • Andrew Medico
    Andrew Medico
    2008-10-07

    • status: open-fixed --> closed-fixed