openbsd-ports/math/R/patches/patch-src_main_connections_c
2008-10-26 23:04:00 +00:00

23 lines
801 B
Plaintext

$OpenBSD: patch-src_main_connections_c,v 1.8 2008/10/26 23:04:00 mbalmer Exp $
--- src/main/connections.c.orig Sun Sep 21 22:05:25 2008
+++ src/main/connections.c Sat Oct 25 22:48:16 2008
@@ -2269,7 +2269,7 @@ static int text_vfprintf(Rconnection con, const char *
b = R_alloc(res + already + 1, sizeof(char));
strcpy(b, this->lastline);
p = b + already;
- vsprintf(p, format, ap);
+ vsnprintf(p, res + already + 1, format, ap);
} else if(res < 0) { /* just a failure indication */
#define NBUFSIZE (already + 100*BUFSIZE)
usedRalloc = TRUE;
@@ -4370,7 +4370,8 @@ static Rboolean gzcon_open(Rconnection con)
if(con->canread) {
/* read header */
- char c, ccc, method, flags, dummy[6];
+ signed char c;
+ char ccc, method, flags, dummy[6];
unsigned char head[2];
uInt len;