diff options
Diffstat (limited to 'apt-pkg/contrib')
-rw-r--r-- | apt-pkg/contrib/cmndline.cc | 1 | ||||
-rw-r--r-- | apt-pkg/contrib/fileutl.cc | 3 | ||||
-rw-r--r-- | apt-pkg/contrib/strutl.cc | 2 |
3 files changed, 5 insertions, 1 deletions
diff --git a/apt-pkg/contrib/cmndline.cc b/apt-pkg/contrib/cmndline.cc index 8cef80368..2086d91ca 100644 --- a/apt-pkg/contrib/cmndline.cc +++ b/apt-pkg/contrib/cmndline.cc @@ -397,6 +397,7 @@ bool CommandLine::DispatchArg(Dispatch *Map,bool NoMatch) void CommandLine::SaveInConfig(unsigned int const &argc, char const * const * const argv) { char cmdline[100 + argc * 50]; + memset(cmdline, 0, sizeof(cmdline)); unsigned int length = 0; bool lastWasOption = false; bool closeQuote = false; diff --git a/apt-pkg/contrib/fileutl.cc b/apt-pkg/contrib/fileutl.cc index dca468c63..47a91c294 100644 --- a/apt-pkg/contrib/fileutl.cc +++ b/apt-pkg/contrib/fileutl.cc @@ -1777,7 +1777,8 @@ std::vector<std::string> Glob(std::string const &pattern, int flags) { std::vector<std::string> result; glob_t globbuf; - int glob_res, i; + int glob_res; + unsigned int i; glob_res = glob(pattern.c_str(), flags, NULL, &globbuf); diff --git a/apt-pkg/contrib/strutl.cc b/apt-pkg/contrib/strutl.cc index d06637155..0955b69f7 100644 --- a/apt-pkg/contrib/strutl.cc +++ b/apt-pkg/contrib/strutl.cc @@ -943,6 +943,8 @@ bool StrToTime(const string &Val,time_t &Result) Tm.tm_isdst = 0; if (Month[0] != 0) Tm.tm_mon = MonthConv(Month); + else + Tm.tm_mon = 0; // we don't have a month, so pick something Tm.tm_year -= 1900; // Convert to local time and then to GMT |