소스 검색

[check_dns] Update IF_RECORD to not erase query_found.
Fixes issue #115

Bill Blough 10 년 전
부모
커밋
bfe7f8c360
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      plugins/check_dns.c

+ 1 - 1
plugins/check_dns.c

@@ -33,7 +33,7 @@
       temp_buffer = rindex (chld_out.line[i], ' '); \
       addresses[n_addresses++] = check_new_address(temp_buffer); \
       strncpy(query_found, querytype, sizeof(query_found)); \
-      memset(query_found, '\0', sizeof(query_found));
+      query_found[sizeof(querytype)] = '\0';
 
 const char *progname = "check_dns";
 const char *copyright = "2000-2014";