summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOrestis Floros <orestisflo@gmail.com>2020-10-09 12:51:53 +0200
committerGitHub <noreply@github.com>2020-10-09 12:51:53 +0200
commit3f27399d730bb9a66bebfed6aff2660828687ca5 (patch)
tree478c7299bfd8f1483b09279701dda6d34f042f40
parent8bcf5491d805ba0e97d0904040218f15b5c478a6 (diff)
parentafc73e19827a4161890b9acfe4373914b3411aeb (diff)
Merge pull request #433 from cherti/initialization
Initialize fields with zero bytes in wireless module
-rw-r--r--src/print_wireless_info.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/print_wireless_info.c b/src/print_wireless_info.c
index ff63c41..582201f 100644
--- a/src/print_wireless_info.c
+++ b/src/print_wireless_info.c
@@ -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)