]> granicus.if.org Git - graphviz/commitdiff
Change use of snprintf to safe use of sprintf, since Windows does not have
authorerg <devnull@localhost>
Wed, 28 Jun 2006 18:51:00 +0000 (18:51 +0000)
committererg <devnull@localhost>
Wed, 28 Jun 2006 18:51:00 +0000 (18:51 +0000)
snprintf.

lib/common/emit.c

index 899784f109a39aedc66d5966235e02c3e8afdd81..c196d355706b8457c8d8d4d9b0632abd0c35a78f 100644 (file)
@@ -1851,12 +1851,12 @@ static void auto_output_filename(GVJ_t *job)
 {
     static char *buf;
     static int bufsz;
-    char gidx[20];
+    char gidx[100];  /* large enough for '.' plus any integer */
     char *fn;
     int len;
 
     if (job->graph_index)
-       snprintf(gidx, sizeof(gidx), ".%d", job->graph_index + 1);
+       sprintf(gidx, ".%d", job->graph_index + 1);
     else
        gidx[0] = '\0';
     if (!(fn = job->input_filename))