[Expat-discuss] XML_SetHashSalt(p, 0) semantics

Joe Orton jorton at redhat.com
Mon May 14 18:09:54 CEST 2012


On Fri, May 11, 2012 at 01:16:15PM -0400, Karl Waclawek wrote:
> Yes, this should have been documented. Please file a bug report.

https://sourceforge.net/tracker/?func=detail&aid=3526620&group_id=10127&atid=110127

> 0 is used as a sentinel value that means that no secret salt value has been
> set and therefore one needs to be generated.
> 
> In any case, one  can always use another value if a fixed hash salt is
> desired, but I wonder why one would want to turn this off.

My guess: it's useful because the hash ordering randomisation fixes have 
a tendency to break test cases which make bad API assumptions; allowing 
a zero hash (and hence the old hash ordering) is at least a temporary 
reprieve until those test suites are fixed.

Regards, Joe


More information about the Expat-discuss mailing list