From bc54b3f3b382234746c5335ebf3aea5273d5fa03 Mon Sep 17 00:00:00 2001 From: Stas Degteff Date: Thu, 17 Feb 2011 15:37:30 +0000 Subject: [PATCH] Accuracy, not strong test length of string in strschg_environ --- goldlib/gall/gfilutl2.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/goldlib/gall/gfilutl2.cpp b/goldlib/gall/gfilutl2.cpp index 484d524..2626148 100644 --- a/goldlib/gall/gfilutl2.cpp +++ b/goldlib/gall/gfilutl2.cpp @@ -95,7 +95,7 @@ int strschg_environ(std::string& s) { const char *p = s.c_str()+1; struct passwd *pe=NULL; - if((s.length() != 1) and not isslash(*p)) { + if((s.length() > 1) and not isslash(*p)) { while(*p and not isslash(*p)) name += *p++; pe = getpwnam(name.c_str());