mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-26 23:13:00 +02:00
libiw/iwscan.cpp: fix crash in case of different cmd order
Origin commit data
------------------
Branch: ni/coolstream
Commit: 40167afef4
Author: [CST] Focus <focus.cst@gmail.com>
Date: 2014-07-16 (Wed, 16 Jul 2014)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -219,6 +219,11 @@ realloc:
|
||||
if (ret <= 0)
|
||||
break;
|
||||
switch(event->cmd) {
|
||||
case SIOCGIWAP:
|
||||
count++;
|
||||
networks.push_back(network);
|
||||
printf(" Network %d:\n", count+1);
|
||||
break;
|
||||
case SIOCGIWESSID:
|
||||
{
|
||||
char essid[IW_ESSID_MAX_SIZE+1];
|
||||
@@ -228,14 +233,12 @@ realloc:
|
||||
if(event->u.essid.flags)
|
||||
{
|
||||
printf(" ESSID:\"%s\"\n", essid);
|
||||
network.ssid = essid;
|
||||
networks[count].ssid = essid;
|
||||
}
|
||||
else {
|
||||
printf(" ESSID:off/any/hidden\n");
|
||||
network.ssid = "(hidden)";
|
||||
networks[count].ssid = "(hidden)";
|
||||
}
|
||||
count++;
|
||||
networks.push_back(network);
|
||||
}
|
||||
|
||||
break;
|
||||
|
Reference in New Issue
Block a user