Make sure chown_flag is always initialized

Suggested-by: christian@whoop.org
Resolves: #1223329
This commit is contained in:
Michal Sekletar 2015-06-29 21:01:59 +02:00
parent 4370839629
commit 12e78949cc
2 changed files with 6 additions and 3 deletions

View File

@ -38,11 +38,11 @@ diff --git a/tcpdump.c b/tcpdump.c
index 2fd1617..4cbeb05 100644
--- a/tcpdump.c
+++ b/tcpdump.c
@@ -1029,6 +1029,7 @@ main(int argc, char **argv)
@@ -1029,3 +1029,4 @@ main(int argc, char **argv)
cap_rights_t rights;
int cansandbox;
#endif /* HAVE_CAPSICUM */
+ int chown_flag;
+ int chown_flag = 0;
#ifdef WIN32
if(wsockinit() != 0) return 1;

View File

@ -2,7 +2,7 @@ Summary: A network traffic monitoring tool
Name: tcpdump
Epoch: 14
Version: 4.7.4
Release: 2%{?dist}
Release: 3%{?dist}
License: BSD with advertising
URL: http://www.tcpdump.org
Group: Applications/Internet
@ -82,6 +82,9 @@ exit 0
%{_mandir}/man8/tcpdump.8*
%changelog
* Mon Jun 29 2015 Michal Sekletar <msekleta@redhat.com> - 14:4.7.4-3
- prevent sefaulting by properly initializing chown_flag variable (#1223329)
* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 14:4.7.4-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild