Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/xlint/lint1 Trash freed memory so we catch bad uses.



details:   https://anonhg.NetBSD.org/src/rev/d11fb1decf05
branches:  trunk
changeset: 795533:d11fb1decf05
user:      christos <christos%NetBSD.org@localhost>
date:      Thu Apr 17 16:30:05 2014 +0000

description:
Trash freed memory so we catch bad uses.

diffstat:

 usr.bin/xlint/lint1/mem1.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 3f4f080f0426 -r d11fb1decf05 usr.bin/xlint/lint1/mem1.c
--- a/usr.bin/xlint/lint1/mem1.c        Thu Apr 17 16:29:26 2014 +0000
+++ b/usr.bin/xlint/lint1/mem1.c        Thu Apr 17 16:30:05 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mem1.c,v 1.15 2011/06/24 01:10:31 christos Exp $       */
+/*     $NetBSD: mem1.c,v 1.16 2014/04/17 16:30:05 christos Exp $       */
 
 /*
  * Copyright (c) 1994, 1995 Jochen Pohl
@@ -37,7 +37,7 @@
 
 #include <sys/cdefs.h>
 #if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: mem1.c,v 1.15 2011/06/24 01:10:31 christos Exp $");
+__RCSID("$NetBSD: mem1.c,v 1.16 2014/04/17 16:30:05 christos Exp $");
 #endif
 
 #include <sys/types.h>
@@ -230,7 +230,7 @@
                *fmbp = mb->nxt;
                mb->nxt = frmblks;
                frmblks = mb;
-               (void)memset(mb->blk, 0, mb->size - mb->nfree);
+               (void)memset(mb->blk, 0xa5, mb->size - mb->nfree);
        }
 }
 



Home | Main Index | Thread Index | Old Index