Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change recovered filename to handle more than 2^32 sectors. #47

Closed
willgetheresomeday opened this issue Apr 29, 2018 · 9 comments
Closed

Comments

@willgetheresomeday
Copy link

Dealing with a large drive I noticed the sector number drop in the recovered filename. Checking with hdparm the data at the sector didn't match but earlier files did. but adding a multiple of 2^32 located the sector.

Looking (quickly) at the code it uses 'unsigned long' for the file locations but then casts to 'unsigned int' when creating the filename.

@cgsecurity
Copy link
Owner

Which version are using ? (output of "photorec -version") Are you using a 32-bit version of PhotoRec ?

@willgetheresomeday
Copy link
Author

testdisk-7.0-11.fc27.x86_64

@willgetheresomeday
Copy link
Author

PhotoRec 7.0, Data Recovery Utility, April 2015
Christophe GRENIER grenier@cgsecurity.org
http://www.cgsecurity.org

Version: 7.0
Compiler: GCC 7.1
Compilation date: 2017-08-05T00:23:11
ext2fs lib: 1.43.5, ntfs lib: libntfs-3g, ewf lib: 20140608, libjpeg: libjpeg-turbo-1.5.1, curses lib: ncurses 6.0
OS: Linux, kernel 4.13.9-300.fc27.x86_64 (#1 SMP Mon Oct 23 13:41:58 UTC 2017) x86_64

@cgsecurity
Copy link
Owner

You can try the fixed version using

dnf copr enable grenier/testdisk
dnf update testdisk

Please tell me if it works as expected.

@willgetheresomeday
Copy link
Author

Thanks for the update will report back next week.

@willgetheresomeday
Copy link
Author

That didn't work.

Recovery got as high as 4290195791 and the next file was at saved as 26021629.

So some mod 2^32 still being done.

But I've just noticed ....photorec -v says

PhotoRec 7.1-WIP, Data Recovery Utility, November 2017

not

PhotoRec 7.1-WIP, Data Recovery Utility, April 2018

@cgsecurity
Copy link
Owner

cgsecurity commented May 4, 2018

Can you check that copr is enabled and the version after a "dnf reinstall testdisk" ?

@willgetheresomeday
Copy link
Author

copr was enabled.

'install' from 'grenier-testdisk' gives 'November 2017'
'reinstall' from 'grenier-testdisk' gives 'April 2018'

Will test the fix and report back.

@willgetheresomeday
Copy link
Author

Fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants