summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
authorMichael Vogt <mvo@debian.org>2013-07-26 22:18:36 +0200
committerMichael Vogt <mvo@debian.org>2013-07-26 22:18:36 +0200
commit163dc55bd6891008adcdf6d683a94e890a00f8c7 (patch)
tree13a3264a629ab99d4169030b6c9d790cb6f03b79 /apt-pkg
parent11d0fb919954e79f929ef5e755f602a6ed3be46d (diff)
fix another missing va_end()
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/contrib/strutl.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/apt-pkg/contrib/strutl.cc b/apt-pkg/contrib/strutl.cc
index d0e74d8c5..df02c3499 100644
--- a/apt-pkg/contrib/strutl.cc
+++ b/apt-pkg/contrib/strutl.cc
@@ -1233,12 +1233,12 @@ char *safe_snprintf(char *Buffer,char *End,const char *Format,...)
va_list args;
int Did;
- va_start(args,Format);
-
if (End <= Buffer)
return End;
-
+ va_start(args,Format);
Did = vsnprintf(Buffer,End - Buffer,Format,args);
+ va_end(args);
+
if (Did < 0 || Buffer + Did > End)
return End;
return Buffer + Did;