summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Cantrell <dcantrell@redhat.com>2006-11-28 19:32:35 +0000
committerDavid Cantrell <dcantrell@redhat.com>2006-11-28 19:32:35 +0000
commit345caabe67c7e3016086ac6686636260ce50e8f6 (patch)
tree6e588473a68aa6bd39963f7b0700913e87c3483b
parentb645d61940fb94df8a77212646b78d2cc463444a (diff)
downloadanaconda-345caabe67c7e3016086ac6686636260ce50e8f6.tar.gz
anaconda-345caabe67c7e3016086ac6686636260ce50e8f6.tar.xz
anaconda-345caabe67c7e3016086ac6686636260ce50e8f6.zip
* isys/wireless.c (set_essid, get_essid): Init wreq struct before
use (#215367).
-rw-r--r--ChangeLog5
-rw-r--r--isys/wireless.c10
2 files changed, 12 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index a85e3b152..4c1ebea03 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-11-28 David Cantrell <dcantrell@redhat.com>
+
+ * isys/wireless.c (set_essid, get_essid): Init wreq struct before
+ use (#215367).
+
2006-11-28 Chris Lumens <clumens@redhat.com>
* iw/language_gui.py (LanguageWindow.getNext): If we changed
diff --git a/isys/wireless.c b/isys/wireless.c
index fd893c888..77e6b54b0 100644
--- a/isys/wireless.c
+++ b/isys/wireless.c
@@ -67,8 +67,10 @@ int is_wireless_interface(char * ifname) {
/* set the essid for ifname to essid. if essid is NULL, do automatically */
int set_essid(char * ifname, char * essid) {
int sock;
- struct iwreq wreq;
-
+ struct iwreq wreq;
+
+ memset(&wreq, 0, sizeof (wreq));
+
if (strlen(essid) > IW_ESSID_MAX_SIZE) {
fprintf(stderr, "essid too long\n");
return -1;
@@ -101,7 +103,9 @@ int set_essid(char * ifname, char * essid) {
char * get_essid(char * ifname) {
int sock;
struct iwreq wreq;
-
+
+ memset(&wreq, 0, sizeof (wreq));
+
sock = get_socket();
wreq = get_wreq(ifname);