summaryrefslogtreecommitdiff
path: root/cut-n-paste
diff options
context:
space:
mode:
authorQuipyowert2 <[email protected]>2019-08-22 11:42:33 +0200
committerraveit65 <[email protected]>2019-08-29 12:00:35 +0200
commitee113966bc8feb912c1003b262f99eb07894aeed (patch)
treed2be749013dbb21c719ec2c84388bfb0eaf52e74 /cut-n-paste
parentf1c1bbd843ab9ec47aa56782901d749bf895068f (diff)
downloadatril-ee113966bc8feb912c1003b262f99eb07894aeed.tar.bz2
atril-ee113966bc8feb912c1003b262f99eb07894aeed.tar.xz
End the va_list before returning from _synctex_merge_strings
This adds a va_end() call to _synctex_merge_strings in two places where it would return without ending the va_list first. https://github.com/jlaurens/synctex/commit/44b860175da10d08830b551f59592e548fe19718
Diffstat (limited to 'cut-n-paste')
-rw-r--r--cut-n-paste/synctex/synctex_parser_utils.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/cut-n-paste/synctex/synctex_parser_utils.c b/cut-n-paste/synctex/synctex_parser_utils.c
index c4f200d8..cc59530c 100644
--- a/cut-n-paste/synctex/synctex_parser_utils.c
+++ b/cut-n-paste/synctex/synctex_parser_utils.c
@@ -351,6 +351,7 @@ char * _synctex_merge_strings(const char * first,...) {
size_t len = strlen(temp);
if(UINT_MAX-len<size) {
_synctex_error("! _synctex_merge_strings: Capacity exceeded.");
+ va_end(arg);
return NULL;
}
size+=len;
@@ -371,6 +372,7 @@ char * _synctex_merge_strings(const char * first,...) {
_synctex_error("! _synctex_merge_strings: Copy problem");
free(result);
result = NULL;
+ va_end(arg);
return NULL;
}
dest += size;