Skip to content

Commit

Permalink
Merge pull request #433 from cherti/initialization
Browse files Browse the repository at this point in the history
Initialize fields with zero bytes in wireless module
  • Loading branch information
orestisfl authored Oct 9, 2020
2 parents 8bcf549 + afc73e1 commit 3f27399
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/print_wireless_info.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 3f27399

Please sign in to comment.