[Rd] Possible bug in Rcons_vprintf

Jeffrey Horner jeff.horner at vanderbilt.edu
Fri Sep 29 22:22:51 CEST 2006



In R-2-4-branch r39548, Rcons_vprintf is called from stdout_vfprintf 
when R_Outputfile is NULL. When called and output is greater than 
R_BUFSIZE, output is truncated to R_BUFSIZE. Here's a one-line fix:

Index: src/main/printutils.c
===================================================================
--- src/main/printutils.c       (revision 39548)
+++ src/main/printutils.c       (working copy)
@@ -638,7 +638,7 @@
             res = R_BUFSIZE;
      }
  #endif /* HAVE_VA_COPY */
-    R_WriteConsole(p, strlen(buf));
+    R_WriteConsole(p, strlen(p));
  #ifdef HAVE_VA_COPY
      if(usedRalloc) vmaxset(vmax);
      if(usedVasprintf) free(p);


Jeff
-- 
http://biostat.mc.vanderbilt.edu/JeffreyHorner




More information about the R-devel mailing list