[Interest] Qt Resource Compiler - why does it randomize the order of items?

Thiago Macieira thiago.macieira at intel.com
Mon May 19 18:22:28 CEST 2014


Em seg 19 maio 2014, às 13:53:58, Richard Moore escreveu:
> On 19 May 2014 09:18, Ola Røer Thorsen <ola at silentwings.no> wrote:
> > Hi,
> > 
> > If I call rcc (the Qt Resource Compiler) twice using the exact same input,
> > the resulting .cpp files are never exactly the same. They are all
> > completely valid, just the ordering of "items" inside is different. I'm
> > just curious, why?
> 
> It's due to the hash randomisation. This was done to avoid DoS attacks that
> can be performed by  tweaking data to ensure it always falls into the same
> hash bucket.

If you need bitwise identical builds for the same source, set the same hash 
seed value:

	QT_HASH_SEED=nnnn

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center




More information about the Interest mailing list