Module Name: src Committed By: christos Date: Thu Apr 17 16:30:06 UTC 2014
Modified Files: src/usr.bin/xlint/lint1: mem1.c Log Message: Trash freed memory so we catch bad uses. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/usr.bin/xlint/lint1/mem1.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/usr.bin/xlint/lint1/mem1.c diff -u src/usr.bin/xlint/lint1/mem1.c:1.15 src/usr.bin/xlint/lint1/mem1.c:1.16 --- src/usr.bin/xlint/lint1/mem1.c:1.15 Thu Jun 23 21:10:31 2011 +++ src/usr.bin/xlint/lint1/mem1.c Thu Apr 17 12:30:05 2014 @@ -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 @@ xfreeblk(mbl_t **fmbp) *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); } }