From 42f7d07997a1ddc3cefef7a87aad15ed818ee683 Mon Sep 17 00:00:00 2001 From: jpandre Date: Thu, 21 Jan 2010 08:09:13 +0000 Subject: [PATCH] Avoided a possible null pointer dereference (Fabian Keil) --- libntfs-3g/runlist.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libntfs-3g/runlist.c b/libntfs-3g/runlist.c index bc959313..6c99e8e0 100644 --- a/libntfs-3g/runlist.c +++ b/libntfs-3g/runlist.c @@ -1622,7 +1622,11 @@ int ntfs_rl_truncate(runlist **arl, const VCN start_vcn) if (!arl || !*arl) { errno = EINVAL; - ntfs_log_perror("rl_truncate error: arl: %p *arl: %p", arl, *arl); + if (!arl) + ntfs_log_perror("rl_truncate error: arl: %p", arl); + else + ntfs_log_perror("rl_truncate error:" + " arl: %p *arl: %p", arl, *arl); return -1; }