CID:294 SECURE_CODING
authorNelson Ferreira <nelson.ferreira@ieee.org>
Fri, 30 Sep 2011 23:02:33 +0000 (19:02 -0400)
committerNelson Ferreira <nelson.ferreira@ieee.org>
Fri, 30 Sep 2011 23:02:33 +0000 (19:02 -0400)
* src/lstream.c (print_lstream): use write_fmt_string instead of sprintf

Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
src/lstream.c

index d70c64c..238509b 100644 (file)
@@ -154,11 +154,8 @@ static void
 print_lstream(Lisp_Object obj, Lisp_Object printcharfun, int escapeflag)
 {
        lstream_t lstr = XLSTREAM(obj);
-       char buf[200];
-
-       sprintf(buf, "#<INTERNAL OBJECT (SXEmacs bug?) (%s lstream) 0x%lx>",
-               lstr->imp->name, (long)lstr);
-       write_c_string(buf, printcharfun);
+       write_fmt_string(printcharfun, "#<INTERNAL OBJECT (SXEmacs bug?) (%s lstream) 0x%lx>",
+                        lstr->imp->name, (long)lstr);
 }
 
 static void finalize_lstream(void *header, int for_disksave)