libsheepy

C lib for handling text files, strings and json like data structure with an object oriented system
git clone https://spartatek.se/git/libsheepy.git
Log | Files | Refs | README | LICENSE

commit 63e4a9c5817d51dd11ba658ea76b03b0d41f3e06
parent 4ccb4563ad982f3076e440e7c8dd92d80ad438c1
Author: Remy Noulin <loader2x@gmail.com>
Date:   Thu, 28 Apr 2022 13:09:47 +0200

bugfix: avoid freeing a static string when the system is out of memory in shEPrintS

(detected by ikos)

release/libsheepy.c | 2 +-
release/libsheepy.h | 2 +-
src/libsheepy.c     | 2 +-
src/libsheepy.h     | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)

Diffstat:
Mrelease/libsheepy.c | 2+-
Mrelease/libsheepy.h | 2+-
Msrc/libsheepy.c | 2+-
Msrc/libsheepy.h | 2+-
4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/release/libsheepy.c b/release/libsheepy.c @@ -6570,7 +6570,7 @@ void shEPrintfS(const char *fmt, ...) { return; } // print with logE - char *s = "";; + char *s = NULL; va_start(pl, fmt); vasprintf(&s, fmt, pl); va_end(pl); diff --git a/release/libsheepy.h b/release/libsheepy.h @@ -98,7 +98,7 @@ // version accoring to the version package: Release.Major.minor.patch // https://noulin.net/version/file/README.md.html -#define LIBSHEEPY_VERSION "2.2.9" +#define LIBSHEEPY_VERSION "2.2.9.1" #ifndef SH_PREFIX #define SH_PREFIX(NAME) NAME diff --git a/src/libsheepy.c b/src/libsheepy.c @@ -6626,7 +6626,7 @@ void shEPrintfS(const char *fmt, ...) { return; } // print with logE - char *s = "";; + char *s = NULL; va_start(pl, fmt); vasprintf(&s, fmt, pl); va_end(pl); diff --git a/src/libsheepy.h b/src/libsheepy.h @@ -98,7 +98,7 @@ // version accoring to the version package: Release.Major.minor.patch // https://noulin.net/version/file/README.md.html -#define LIBSHEEPY_VERSION "2.2.9" +#define LIBSHEEPY_VERSION "2.2.9.1" #ifndef SH_PREFIX #define SH_PREFIX(NAME) NAME