id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 586,iostreams // file_descriptor::seek BUG on files > 4 GB,nobody,Jonathan Turkanis,"{{{ Boost 1.33.1 iostreams library file_descriptor::seek() method file_descriptor.cpp, line 198 Win32, Visual C++ 2005 The method seek() can return a wrong value of a newly set offset when the offset is further than 4 GB. //--------------- return offset_to_position((lDistanceToMoveHigh << 32) + dwResultLow); //--------------- The code above has a bug. On 32-bit systems the expression (lDistanceToMoveHigh << 32) equals to lDistanceToMoveHigh. The correct code should first cast the lDistanceToMoveHigh variable to 64-bit and then shift it. //--------------- return (static_cast lDistanceToMoveHigh) << 32) + dwResultLow; //--------------- Sergey Kolodkin }}}",Patches,closed,,iostreams,None,Problem,fixed,,