TIMINGSAFE*: slight bugfix for timingsafe_bcmp, and small change for timingsafe_memcmp.

timingsafe_bcmp => turning the predecrement to postdecrement gives expected behavior, plus a slight "optimization" for timingsafe_memcmp, withdraws an unnecessary if as if n equals 0 the following computation does not occur anyway ...

Signed-off-by: Shawn Wenn <lattera@gmail.com>
In r268924 __fflush was modified so that when write(2) was not successful,
_p and _w are adjusted to account for the partial write (if any).

However, _p and _w should not be unconditionally adjusted and should only
be changed when we actually wrote some bytes, or the accumulated accounting
error will eventually result in a heap buffer overflow.

Reported by:	adrian and alfred (Norse Corporation)
Security:	FreeBSD-SA-14:27.stdio
Security:	CVE-2014-8611
Fix multiple vulnerabilities in file(1) and libmagic(3).

Security:	FreeBSD-SA-14:28.file
Security:	CVE-2014-3710, CVE-2014-8116, CVE-2014-8117
Merge remote-tracking branch 'freebsd/master' into hardened/current/master
Merge remote-tracking branch 'origin/hardened/current/master' into hardened/current/segvguard
Merge remote-tracking branch 'origin/hardened/current/master' into hardened/current/log
Merge remote-tracking branch 'origin/hardened/current/master' into hardened/current/userlandenhanced
Merge remote-tracking branch 'origin/hardened/current/master' into hardened/current/unstable
Merge remote-tracking branch 'origin/hardened/current/segvguard' into hardened/current/unstable
Merge remote-tracking branch 'origin/hardened/current/log' into hardened/current/unstable
Merge remote-tracking branch 'origin/hardened/current/userlandenhanced' into hardened/current/unstable