Commit 1cd91bdf authored by Mayo Roettger's avatar Mayo Roettger
Browse files

Fixed function exportSBML for possible overflow in buffer

parent ac7da9a1
Package: sybilSBML
Type: Package
Title: SBML Integration in Package 'Sybil'
Version: 3.1.0
Date: 2020-03-23
Version: 3.1.1
Date: 2020-03-25
Authors@R: c(person("Mayo", "Roettger", role = "cre", email = "mayo.roettger@hhu.de"),
person("Gabriel", "Gelius-Dietrich", role = c("aut", "ctb")),
person(c("C.", "Jonathan"), "Fritzemeier", role = "ctb", email = "clausjonathan.fritzemeier@uni-duesseldorf.de"),
......@@ -17,7 +17,7 @@ License: GPL-3 | file LICENSE
LazyLoad: yes
Collate: generics.R sbmlPtrClass.R sbmlErrorClass.R sybilSBML.R
uglyHack.R readSBMLmod.R zzz.R
Packaged: 2020-03-23 12:00:00 UTC; mayo
Packaged: 2020-03-25 10:38:00 UTC; mayo
Author: Mayo Roettger [cre],
Gabriel Gelius-Dietrich [aut, ctb],
C. Jonathan Fritzemeier [ctb],
......
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for sybilSBML 3.1.0.
# Generated by GNU Autoconf 2.69 for sybilSBML 3.1.1.
#
# Report bugs to <mayo.roettger@hhu.de>.
#
......@@ -580,8 +580,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='sybilSBML'
PACKAGE_TARNAME='sybilsbml'
PACKAGE_VERSION='3.1.0'
PACKAGE_STRING='sybilSBML 3.1.0'
PACKAGE_VERSION='3.1.1'
PACKAGE_STRING='sybilSBML 3.1.1'
PACKAGE_BUGREPORT='mayo.roettger@hhu.de'
PACKAGE_URL=''
......@@ -1243,7 +1243,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures sybilSBML 3.1.0 to adapt to many kinds of systems.
\`configure' configures sybilSBML 3.1.1 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
......@@ -1305,7 +1305,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of sybilSBML 3.1.0:";;
short | recursive ) echo "Configuration of sybilSBML 3.1.1:";;
esac
cat <<\_ACEOF
......@@ -1392,7 +1392,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
sybilSBML configure 3.1.0
sybilSBML configure 3.1.1
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
......@@ -1761,7 +1761,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by sybilSBML $as_me 3.1.0, which was
It was created by sybilSBML $as_me 3.1.1, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
......@@ -4254,7 +4254,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by sybilSBML $as_me 3.1.0, which was
This file was extended by sybilSBML $as_me 3.1.1, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
......@@ -4316,7 +4316,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
sybilSBML config.status 3.1.0
sybilSBML config.status 3.1.1
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
......
AC_INIT([sybilSBML], [3.1.0], [mayo.roettger@hhu.de])
AC_INIT([sybilSBML], [3.1.1], [mayo.roettger@hhu.de])
dnl # --------------------------------------------------------------------
dnl # template config.h.in
......
......@@ -6,7 +6,7 @@
\newcommand{\CRANpkg}{\href{https://cran.r-project.org/package=#1}{\pkg{#1}}}
% ---------------------------------------------------------------------------- %
\section{Changes in version 3.0.4 - 3.1.0 2020-03-23}{
\section{Changes in version 3.0.4 - 3.1.1 2020-03-24}{
\itemize{
\item Maintainer change.
\item Changes to be able to build package without libSBML FBC and Groups
......@@ -16,6 +16,8 @@
\item Corrections for CRAN, where && or || encountered arguments of length > 1.
\item Fix for CRAN issue: 'config' variable 'CPP' is deprecated.
\item Fix for CRAN issue: too many states (abstraction error?).
\item Fix for CRAN issue, where a terminating nul character may be written
past the end of the destination in function \code{exportSBML}.
}
}
......
......@@ -116,6 +116,7 @@
file <- file.path(dir, "ecoli_core_model.xml")
mod <- readSBMLmod(file, bndCond = FALSE)
writeSBML(mod,level=3,version=1,fbcLevel=2)
unlink("export.xml") # remove created example file
}
\keyword{ IO }
......
......@@ -2319,7 +2319,7 @@ SEXP exportSBML (SEXP version, SEXP level, SEXP FbcLevel, SEXP filename, SEXP sy
const double *lower_bnd = REAL(lowbnd);
const double *upper_bnd = REAL(uppbnd);
char buf[21]; // changed from 20 to 21 to avoid buffer overflow
char buf[24]; // 11 + 10 + 1 (signed, even if not used here) + nul = 23 (24 to be absolutely safe)
// FBC1 FLUXBOUNDS
sprintf(buf, "LOWER_BOUND%d", i);
if (INTEGER(obj_coef)[i] != 1)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment