From 1686dd5137b3a3479072f02013a0d46d01d75572 Mon Sep 17 00:00:00 2001 From: nakayama Date: Sat, 15 Nov 2014 18:55:26 +0000 Subject: [PATCH] Disable unused codes that causes SIGBUS or SIGSEGV if character sets option (-E) is specified to mount_smbfs/rump_smbfs. --- external/bsd/smbfs/dist/lib/smb/ctx.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/external/bsd/smbfs/dist/lib/smb/ctx.c b/external/bsd/smbfs/dist/lib/smb/ctx.c index 1abf48a437e9..e69a50d5f66d 100644 --- a/external/bsd/smbfs/dist/lib/smb/ctx.c +++ b/external/bsd/smbfs/dist/lib/smb/ctx.c @@ -33,7 +33,7 @@ */ #include -__RCSID("$NetBSD: ctx.c,v 1.2 2013/12/25 22:03:15 christos Exp $"); +__RCSID("$NetBSD: ctx.c,v 1.3 2014/11/15 18:55:26 nakayama Exp $"); #include #include @@ -501,8 +501,10 @@ smb_ctx_resolve(struct smb_ctx *ctx) struct sockaddr *sap; struct sockaddr_nb *salocal, *saserver; char *cp; +#ifdef notyet u_char cstbl[256]; u_int i; +#endif int error = 0; ctx->ct_flags &= ~SMBCF_RESOLVED; @@ -531,6 +533,7 @@ smb_ctx_resolve(struct smb_ctx *ctx) error = smb_addiconvtbl("toupper", ssn->ioc_localcs, nls_upper); if (error) return error; +#ifdef notyet if (ssn->ioc_servercs[0] != 0) { for(i = 0; i < sizeof(cstbl); i++) cstbl[i] = i; @@ -545,6 +548,7 @@ smb_ctx_resolve(struct smb_ctx *ctx) if (error) return error; } +#endif if (ctx->ct_srvaddr) { error = nb_resolvehost_in(ctx->ct_srvaddr, &sap); } else {