From a18e90bbd673a476dee01d428db0bb5ba06715b8 Mon Sep 17 00:00:00 2001 From: Slava Semushin Date: Sat, 23 May 2009 18:45:56 +0700 Subject: [PATCH 1/2] source4/client/smbumount.c(canonicalize): reorder argument checks. Check argument for not NULL before call strlen() on it. --- source4/client/smbumount.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/source4/client/smbumount.c b/source4/client/smbumount.c index 9ea3083..420b8ac 100644 --- a/source4/client/smbumount.c +++ b/source4/client/smbumount.c @@ -79,14 +79,14 @@ canonicalize (char *path) return NULL; } + if (path == NULL) + return NULL; + if (strlen(path) > PATH_MAX) { fprintf(stderr, "Mount point string too long\n"); return NULL; } - if (path == NULL) - return NULL; - if (realpath (path, canonical)) return canonical; -- 1.6.3.1