Skip to content

Commit 62ae0bf

Browse files
committed
use snprintf instead of sprintf for CRAN compliance
1 parent d51473e commit 62ae0bf

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: nanonext
22
Type: Package
33
Title: NNG (Nanomsg Next Gen) Lightweight Messaging Library
4-
Version: 0.7.1
4+
Version: 0.7.1.9000
55
Description: R binding for NNG (Nanomsg Next Gen), a successor to ZeroMQ. NNG is
66
a socket library providing high-performance scalability protocols,
77
implementing a cross-platform standard for messaging and communications.

NEWS.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# nanonext 0.7.1.9000 (development)
2+
3+
#### Updates
4+
5+
* For raw to character hash conversion, uses snprintf instead of sprintf for CRAN compliance.
6+
17
# nanonext 0.7.1
28

39
#### New Features

src/tls.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ static SEXP nano_hashToChar(SEXP hash) {
9999
char out[sz * 2 + 1];
100100

101101
for (R_xlen_t i = 0; i < sz; i++)
102-
sprintf(&out[i * 2], "%.2x", buf[i]);
102+
snprintf(&out[i * 2], 3, "%.2x", buf[i]);
103103

104104
return Rf_mkString(out);
105105

0 commit comments

Comments
 (0)