Re: Error segmentation fault.

Jeff Layton <[email protected]>
Newsgroups gmane.linux.file-systems.cifs
Message-ID <[email protected]>
On Sun, 7 Mar 2010 19:02:12 +0100
Stef Bon <[email protected]> wrote:

> Hello,
> 
> some days ago I've posted a message I could not compile cifs-utils,
> because it needs a kerberos header.
> 
> I've installed kerberos from source, so now I've installed it.
> 
> But when I try to use it, it only gives errors. First I thought it had
> to do with the kernel (version 2.6.30.5),
> so I installed the latest kernel at this moment, 2.6 33.
> 
> Now I'm trying at again, but again errors:
> 
> mount.cifs  //sclfs20091030/public mount -o ip=192.168.0.1,guest
> 
> Mar  7 18:59:21 clfs20091030 kernel: mount.cifs[6035]: segfault at 14
> ip 0804bffe sp bff54cc0 error 4 in mount.cifs[8048000+7000]
> 
> This is the same when I use a valid credentialsfile.
> When I reinstall the mount.cifs from the samba-3.4.4 source everything
> works again.
> 

Does the attached patch fix it?

-- 
Jeff Layton <[email protected]>

_______________________________________________
linux-cifs-client mailing list
[email protected]
https://lists.samba.org/mailman/listinfo/linux-cifs-client
0001-mount.cifs-check-for-NULL-addr-pointer-before-handli.patch (text/x-patch, 801 B)
From cff3f7cb2b94aec118f27ee8dd904ef216489938 Mon Sep 17 00:00:00 2001
From: Jeff Layton <[email protected]>
Date: Sun, 7 Mar 2010 18:49:33 -0500
Subject: [PATCH] mount.cifs: check for NULL addr pointer before handling scopeid

Signed-off-by: Jeff Layton <[email protected]>
---
 mount.cifs.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/mount.cifs.c b/mount.cifs.c
index 5237476..4e38415 100644
--- a/mount.cifs.c
+++ b/mount.cifs.c
@@ -1604,7 +1604,7 @@ mount_retry:
 		}
 	}
 
-	if (addr->ai_addr->sa_family == AF_INET6 && addr6->sin6_scope_id) {
+	if (addr && addr->ai_addr->sa_family == AF_INET6 && addr6->sin6_scope_id) {
 		strlcat(options, "%", options_size);
 		current_len = strnlen(options, options_size);
 		optionstail = options + current_len;
-- 
1.6.6.1
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.