Browse Source

document why we explicit_bzero

OPENBSD_5_6
deraadt 10 years ago
parent
commit
db13a3eef8
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      src/lib/libc/crypt/arc4random.c

+ 2
- 2
src/lib/libc/crypt/arc4random.c View File

@ -1,4 +1,4 @@
/* $OpenBSD: arc4random.c,v 1.36 2014/06/20 00:02:12 matthew Exp $ */
/* $OpenBSD: arc4random.c,v 1.37 2014/06/25 04:22:08 deraadt Exp $ */
/* /*
* Copyright (c) 1996, David Mazieres <dm@uun.org> * Copyright (c) 1996, David Mazieres <dm@uun.org>
@ -99,7 +99,7 @@ _rs_stir(void)
_rs_init(rnd, sizeof(rnd)); _rs_init(rnd, sizeof(rnd));
else else
_rs_rekey(rnd, sizeof(rnd)); _rs_rekey(rnd, sizeof(rnd));
explicit_bzero(rnd, sizeof(rnd));
explicit_bzero(rnd, sizeof(rnd)); /* discard source seed */
/* invalidate rs_buf */ /* invalidate rs_buf */
rs->rs_have = 0; rs->rs_have = 0;


Loading…
Cancel
Save