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'; }