From 104d09da4d471d8003ddd68a5dd582c421d23895 Mon Sep 17 00:00:00 2001 From: Jeroen Ooms Date: Mon, 4 Dec 2023 13:33:59 +0100 Subject: [PATCH] Fix printf warnings for cran --- DESCRIPTION | 2 +- NEWS | 3 +++ src/parse.c | 2 +- src/push_parser.c | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 7dfce7a..a512444 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,5 +1,5 @@ Package: jsonlite -Version: 1.8.8 +Version: 1.8.9 Title: A Simple and Robust JSON Parser and Generator for R License: MIT + file LICENSE Depends: methods diff --git a/NEWS b/NEWS index 414c1c4..ae26363 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,6 @@ +1.8.9 + - Fix printf warnings for cran + 1.8.8 - Apply libyajl patches for CVE-2022-24795, CVE-2022-24795, CVE-2023-33460 diff --git a/src/parse.c b/src/parse.c index 0e600b9..090fa1a 100644 --- a/src/parse.c +++ b/src/parse.c @@ -35,7 +35,7 @@ SEXP R_parse(SEXP x, SEXP bigint_as_char) { /* parser error */ if (!node) { - Rf_errorcall(R_NilValue, errbuf); + Rf_errorcall(R_NilValue, "%s" errbuf); } SEXP out = ParseValue(node, bigint); yajl_tree_free(node); diff --git a/src/push_parser.c b/src/push_parser.c index cd94f12..c0445a0 100644 --- a/src/push_parser.c +++ b/src/push_parser.c @@ -68,5 +68,5 @@ SEXP R_parse_connection(SEXP sConn, SEXP bigint_as_char){ strncpy(errbuf, (char *) errstr, bufsize - 1); yajl_free_error(push_parser, errstr); yajl_free(push_parser); - Rf_error(errbuf); + Rf_error("%s", errbuf); }