Searching for text or hex values with files larger than 2GB

Here you can report bugs found in Far Manager.
Locked
User avatar
Morris
Posts: 1
Joined: Thu Nov 10, 2005 11:35 am
Location: Poland
Contact:

Searching for text or hex values with files larger than 2GB

Post by Morris »

The Alt+F7 (Find file) dialog contains a field to enter a sequence of chars/hex values to search for. When the file being examined is larger than 2GB and the sequence of chars/hex values is not found in first 2GB, FAR will search the file from the beginning again and again, falling in an endless loop. This
does not happen when you open the file in the viewer and perform a search.

Steps to reproduce:
1. Create a dummy file of any size larger than 2GB (say 2200000000 bytes) filled with 0x00.

2. At the very end of the file place any known sequence of chars (like "findme" or something)

3. In the folder containing the file press Alt+F7 and enter "findme" in the "Containg text:" field

FAR does not return from the Find File operation (of course it does not hang or anything - you can press ESC to stop searching). The Filemon utility (from Sysinternals) shows exactly what happens - after reaching the 32-bit Integer boundary (2GB) FAR starts to read the file from the beginning.


FAR 1.70 release
FAR 1.71 alpha 3 (build 2126)
with plugins/without plugins

Windows 2000 Professional PL SP4

PS. Originally I came across this bug when I was searching for files corrupted by MS Update (http://support.microsoft.com/kb/925308) - I run a search for compressed files with "DF DF DF DF DF DF DF DF DF DF DF" sequence - and one of the files on my disk was vista_5600.16384.060829-2230_x86fre_client-lr1cfre_en_dvd.iso (2,709,782,528 bytes)
M.O.R.R.I.S.: Mechanical Obedient Replicant Responsible for Infiltration and Sabotage
morris#rarlab*com
Image
HaRT
Posts: 100
Joined: Thu Mar 09, 2006 6:33 pm
Location: St. Petersburg, Russia

Post by HaRT »

I confirm.

Far b.2126; Win Srv 2k3 Std SP1
HaRT
Posts: 100
Joined: Thu Mar 09, 2006 6:33 pm
Location: St. Petersburg, Russia

Post by HaRT »

I've reported this to the FAR's issue tracking system (in Russian): #243.
Locked