Subject: Re: bug#9118: 23.3.50; Don't seed the RNG in message-unique-id

From: Lars Magne Ingebrigtsen <[email-masked]>
Date: Tue, 19 Jul 2011 16:57:27 +0200

Leo <[email-masked]> writes:

> Function message-unique-id seeds the RNG every time it runs and relies
> on its undocumented return value. Should something like this be applied?
>
> --- a/message.el
> +++ b/message.el
> @@ -5484,7 +5484,8 @@
>    ;; Don't use microseconds from (current-time), they may be unsupported.
>    ;; Instead we use this randomly inited counter.
>    (setq message-unique-id-char
> -	(% (1+ (or message-unique-id-char (logand (random t) (1- (lsh 1 20)))))
> +	(% (1+ (or message-unique-id-char
> +		   (logand (random most-positive-fixnum) (1- (lsh 1 20)))))

Unfortunately, Emacs doesn't seed itself on startup, so (random x) will
return the same thing every time you start Emacs.

So I don't think changing this is appropriate at this time.

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/