Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

Bug in FreeDOS FDISK 1.3.4 or BIOS? (Developers)

posted by boeckmann, Aachen, Germany, 23.11.2022, 14:36

Thanks to all for the feedback.

By skimming over the FDISK source code I think I found a possible location yielding an off-by-one error:

https://gitlab.com/FreeDOS/base/fdisk/-/blob/master/SOURCE/FDISK/FDISK/PDISKIO.C#L919


  pDrive->pri_part[index].end_cyl
           =Extract_Cylinder_From_LBA_Value(
           /* */
           (pDrive->pri_part[index].rel_sect
           +pDrive->pri_part[index].num_sect)...


I think that should be

  pDrive->pri_part[index].end_cyl
           =Extract_Cylinder_From_LBA_Value(
           /* */
           (pDrive->pri_part[index].rel_sect
           +pDrive->pri_part[index].num_sect - 1)...


Can anyone please double-check that?

 

Complete thread:

Back to the forum
Board view  Mix view
22049 Postings in 2034 Threads, 396 registered users, 84 users online (1 registered, 83 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum