From e6ac87f5f1d484e07801d4d03be3a8aaad2a36f1 Mon Sep 17 00:00:00 2001 From: Jeff Lenk Date: Tue, 20 May 2014 22:54:03 -0500 Subject: [PATCH] fixes for VS2010 code analysis - hope these are OK else-ware --- libs/esl/src/esl_event.c | 4 ++++ libs/libteletone/src/libteletone_generate.c | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/libs/esl/src/esl_event.c b/libs/esl/src/esl_event.c index 1fcc4a7a61..380b122228 100644 --- a/libs/esl/src/esl_event.c +++ b/libs/esl/src/esl_event.c @@ -825,10 +825,12 @@ ESL_DECLARE(esl_status_t) esl_event_serialize(esl_event_t *event, char **str, es if ((len + llen) > dlen) { char *m; + char *old = buf; dlen += (blocksize + (len + llen)); if ((m = realloc(buf, dlen))) { buf = m; } else { + buf = old; abort(); } } @@ -852,10 +854,12 @@ ESL_DECLARE(esl_status_t) esl_event_serialize(esl_event_t *event, char **str, es if ((len + llen) > dlen) { char *m; + char *old = buf; dlen += (blocksize + (len + llen)); if ((m = realloc(buf, dlen))) { buf = m; } else { + buf = old; abort(); } } diff --git a/libs/libteletone/src/libteletone_generate.c b/libs/libteletone/src/libteletone_generate.c index 3347909958..f989d8d4c5 100644 --- a/libs/libteletone/src/libteletone_generate.c +++ b/libs/libteletone/src/libteletone_generate.c @@ -414,6 +414,11 @@ TELETONE_API(int) teletone_run(teletone_generation_session_t *ts, const char *cm *e++ = '\0'; } do { +#if (_MSC_VER == 1600) + if (!p) { + break; + } +#endif if ((next = strchr(p, ',')) != 0) { *next++ = '\0'; }