diff options
| author | Denys Vlasenko <vda.linux@googlemail.com> | 2010-01-11 12:09:57 +0100 |
|---|---|---|
| committer | Denys Vlasenko <vda.linux@googlemail.com> | 2010-01-11 12:09:57 +0100 |
| commit | edf6beb585dc38c365ccbdaae85756b2814e1329 (patch) | |
| tree | c356fda7f3397c3b3427f56a5a1584cab7e513c5 /src/Daemon/Daemon.cpp | |
| parent | 14ef0cfe72faf6696df3ef8f42927e9458ccbeeb (diff) | |
| download | abrt-edf6beb585dc38c365ccbdaae85756b2814e1329.tar.gz abrt-edf6beb585dc38c365ccbdaae85756b2814e1329.tar.xz abrt-edf6beb585dc38c365ccbdaae85756b2814e1329.zip | |
*: assorted fixes prompted by security analysis; more to come
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'src/Daemon/Daemon.cpp')
| -rw-r--r-- | src/Daemon/Daemon.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/Daemon/Daemon.cpp b/src/Daemon/Daemon.cpp index 9e1aa0d..0f9c622 100644 --- a/src/Daemon/Daemon.cpp +++ b/src/Daemon/Daemon.cpp @@ -203,10 +203,12 @@ static int SetUpCron() int nM = -1; int nS = -1; +//TODO: rewrite using good old sscanf? + if (pos != std::string::npos) { - std::string sH = ""; - std::string sM = ""; + std::string sH; + std::string sM; sH = it_c->first.substr(0, pos); nH = xatou(sH.c_str()); @@ -221,7 +223,7 @@ static int SetUpCron() } else { - std::string sS = ""; + std::string sS; sS = it_c->first; nS = xatou(sS.c_str()); |
