diff --git a/Config.tmpl b/Config.tmpl
index d20da21..758aed8 100644
--- a/Config.tmpl
+++ b/Config.tmpl
@@ -55,3 +55,6 @@
 /* Ne pas dfinir pour utiliser mktemp() au lieu de mkstemp() */
 #define HAS_MKSTEMP
 
+/* Pour viter les dpassements de capacit des buffers si l'OS le permet */
+#define HAS_SNPRINTF
+
diff --git a/imprime.c b/imprime.c
index 59e6bc1..59a2ff1 100644
--- a/imprime.c
+++ b/imprime.c
@@ -52,11 +52,19 @@ int mode;
     else {
 	if (mode == VIDEOTEX) {
 	    videotexDumpScreen (ecran_minitel, fp);
+#ifdef HAS_SNPRINTF
+	    snprintf (cmd, sizeof(cmd), rsc_xtel.commandeImpression, n);
+#else
 	    sprintf (cmd, rsc_xtel.commandeImpression, n);
+#endif
 	}
 	else { /* ASCII */
 	    videotexConversionAscii (ecran_minitel, fp);
+#ifdef HAS_SNPRINTF
+	    snprintf (cmd, sizeof(cmd), rsc_xtel.commandeImpressionAscii, n);
+#else
 	    sprintf (cmd, rsc_xtel.commandeImpressionAscii, n);
+#endif
 	}
 
 	fclose (fp);
