--- freem/src/cmd_unmap.c 2025/04/09 19:52:02 1.4 +++ freem/src/cmd_unmap.c 2025/04/13 04:22:43 1.5 @@ -1,5 +1,5 @@ /* - * $Id: cmd_unmap.c,v 1.4 2025/04/09 19:52:02 snw Exp $ + * $Id: cmd_unmap.c,v 1.5 2025/04/13 04:22:43 snw Exp $ * Implementation of the UNMAP command * * @@ -24,6 +24,9 @@ * along with FreeM. If not, see . * * $Log: cmd_unmap.c,v $ + * Revision 1.5 2025/04/13 04:22:43 snw + * Fix snprintf calls + * * Revision 1.4 2025/04/09 19:52:02 snw * Eliminate as many warnings as possible while building with -Wall * @@ -42,9 +45,9 @@ MRESULT cmd_unmap(MACTION *ra) { - char mapping_obj[256]; - char tmp_data[256]; - char tmp_key[256]; + char mapping_obj[STRLEN]; + char tmp_data[STRLEN]; + char tmp_key[STRLEN]; if (rtn_dialect () != D_FREEM) { return NOSTAND; @@ -69,7 +72,7 @@ MRESULT cmd_unmap(MACTION *ra) stcpy (mapping_obj, varnam); stcnv_m2c (mapping_obj); - snprintf (tmp_key, 255, "^$SYSTEM\202MAPPINGS\202GLOBAL\202%s\201", mapping_obj); + snprintf (tmp_key, STRLEN - 1, "^$SYSTEM\202MAPPINGS\202GLOBAL\202%s\201", mapping_obj); global (kill_sym, tmp_key, tmp_data); codptr++;