Skip to content

Commit 2b85587

Browse files
committed
Replace sprintf with snprintf for CRAN
1 parent 1e006ca commit 2b85587

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Package: RMySQL
2-
Version: 0.10.24
2+
Version: 0.10.25
33
Title: Database Interface and 'MySQL' Driver for R
44
Description: Legacy 'DBI' interface to 'MySQL' / 'MariaDB' based on old code
55
ported from S-PLUS. A modern 'MySQL' client based on 'Rcpp' is available

NEWS.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# Version 0.10.25
2+
3+
* Replace sprintf with snprintf for CRAN
4+
15
# Version 0.10.24
26

37
* Fix strict-prototypes warnings

src/db-apply.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -442,13 +442,13 @@ void
442442
switch((int) fld_Sclass[group_field]){
443443

444444
case LGLSXP:
445-
(void) sprintf(buff, "%ld", (long) LOGICAL(col)[i]);
445+
(void) snprintf(buff, 1024, "%ld", (long) LOGICAL(col)[i]);
446446
break;
447447
case INTSXP:
448-
(void) sprintf(buff, "%ld", (long) INTEGER(col)[i]);
448+
(void) snprintf(buff, 1024, "%ld", (long) INTEGER(col)[i]);
449449
break;
450450
case REALSXP:
451-
(void) sprintf(buff, "%f", (double) REAL(col)[i]);
451+
(void) snprintf(buff, 1024, "%f", (double) REAL(col)[i]);
452452
break;
453453
case STRSXP:
454454
strcpy(buff, CHAR(STRING_ELT(col, i)));

0 commit comments

Comments
 (0)