]> git.meshlink.io Git - meshlink/blobdiff - test/blackbox/common/common_handlers.c
Fix a potential read from a freed buffer when sending data to a blacklisted node.
[meshlink] / test / blackbox / common / common_handlers.c
index ad32a223e7d867e7b278f8030e237772b129f423..e728f4383684176f9b8fe409eb4b6d5252c63652 100644 (file)
     with this program; if not, write to the Free Software Foundation, Inc.,
     51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 */
+
+#ifdef NDEBUG
+#undef NDEBUG
+#endif
+
 #include <stdio.h>
 #include <signal.h>
 #include <stdlib.h>
@@ -53,7 +58,8 @@ static int meshlink_get_node_in_container(const char *name) {
        return -1;
 }
 
-void mesh_close_signal_handler(int a) {
+void mesh_close_signal_handler(int signum) {
+       (void)signum;
        test_running = false;
 
        exit(EXIT_SUCCESS);