Merge pull request #433 from cherti/initialization

Initialize fields with zero bytes in wireless module
This commit is contained in:
Orestis Floros 2020-10-09 12:51:53 +02:00 committed by GitHub
commit 3f27399d73
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 7 deletions

View File

@ -554,13 +554,13 @@ void print_wireless_info(yajl_gen json_gen, char *buffer, const char *interface,
}
}
char string_quality[STRING_SIZE];
char string_signal[STRING_SIZE];
char string_noise[STRING_SIZE];
char string_essid[STRING_SIZE];
char string_frequency[STRING_SIZE];
char string_ip[STRING_SIZE];
char string_bitrate[STRING_SIZE];
char string_quality[STRING_SIZE] = {'\0'};
char string_signal[STRING_SIZE] = {'\0'};
char string_noise[STRING_SIZE] = {'\0'};
char string_essid[STRING_SIZE] = {'\0'};
char string_frequency[STRING_SIZE] = {'\0'};
char string_ip[STRING_SIZE] = {'\0'};
char string_bitrate[STRING_SIZE] = {'\0'};
if (info.flags & WIRELESS_INFO_FLAG_HAS_QUALITY) {
if (info.quality_max)