From 35025aadc87f305150fe2f5bf71280b17f4214a0 Mon Sep 17 00:00:00 2001 From: mckusick Date: Tue, 25 Feb 2014 18:25:27 +0000 Subject: Arguments for malloc and calloc should be size_t, not int. Use proper bounds check when trying to free cached memory. Spotted by: Xin Li Tested by: Dmitry Sivachenko MFC after: 2 weeks --- sbin/fsck_ffs/fsck.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sbin/fsck_ffs/fsck.h') diff --git a/sbin/fsck_ffs/fsck.h b/sbin/fsck_ffs/fsck.h index a7b5961..c0ec651 100644 --- a/sbin/fsck_ffs/fsck.h +++ b/sbin/fsck_ffs/fsck.h @@ -369,7 +369,7 @@ int flushentry(void); * to get space. */ static inline void* -Malloc(int size) +Malloc(size_t size) { void *retval; @@ -384,7 +384,7 @@ Malloc(int size) * to get space. */ static inline void* -Calloc(int cnt, int size) +Calloc(size_t cnt, size_t size) { void *retval; -- cgit v1.1