summaryrefslogtreecommitdiffstats
path: root/plugins/check_apt.c
diff options
context:
space:
mode:
authorSven Nierlein <sven@nierlein.org>2014-06-28 20:14:02 (GMT)
committerSven Nierlein <sven@nierlein.org>2014-06-28 20:14:02 (GMT)
commitea8ab2002cd72f657582f4dd0a0580bd10131401 (patch)
tree43245ea6bf7f3e7cd0e6ca344dfc94c68189cca2 /plugins/check_apt.c
parente566021a54c500aa2ee0f17bfe4f95d1fd1be243 (diff)
parent9123f6146c5dd3285d8fb78cf3a8cd52bad17ec1 (diff)
downloadmonitoring-plugins-ea8ab2002cd72f657582f4dd0a0580bd10131401.tar.gz
Merge pull request #1263 from waja/coverity_fixes
Serveral coverity fixes from nagios-plugins
Diffstat (limited to 'plugins/check_apt.c')
-rw-r--r--plugins/check_apt.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/check_apt.c b/plugins/check_apt.c
index 4c76a51..07622c2 100644
--- a/plugins/check_apt.c
+++ b/plugins/check_apt.c
@@ -223,6 +223,9 @@ int run_upgrade(int *pkgcount, int *secpkgcount){
223 regex_t ireg, ereg, sreg; 223 regex_t ireg, ereg, sreg;
224 char *cmdline=NULL, rerrbuf[64]; 224 char *cmdline=NULL, rerrbuf[64];
225 225
226 /* initialize ereg as it is possible it is printed while uninitialized */
227 memset(&ereg, "\0", sizeof(ereg.buffer));
228
226 if(upgrade==NO_UPGRADE) return STATE_OK; 229 if(upgrade==NO_UPGRADE) return STATE_OK;
227 230
228 /* compile the regexps */ 231 /* compile the regexps */