]> git.saurik.com Git - apple/security.git/blobdiff - securityd/src/tokencache.cpp
Security-59306.101.1.tar.gz
[apple/security.git] / securityd / src / tokencache.cpp
index 6b4cf91d7d9e03b5ef6609b7503e46b9d12fbc5a..7eb53c9a92a99a30ce07db617a15d20d79f44e20 100644 (file)
@@ -70,7 +70,8 @@ static unsigned long getFile(const string &path, unsigned long defaultValue)
                AutoFileDesc fd(path, O_RDONLY, FileDesc::modeMissingOk);
                if (fd) {
                        string s; fd.readAll(s);
-                       unsigned long value; sscanf(s.c_str(), "%lu", &value);
+                       unsigned long value = defaultValue;
+            sscanf(s.c_str(), "%lu", &value);
                        return value;
                }
        } catch (...) {