HCoop
/
ntk
/
apt.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
11d0fb9
)
fix another missing va_end()
author
Michael Vogt
<mvo@debian.org>
Fri, 26 Jul 2013 20:18:36 +0000
(22:18 +0200)
committer
Michael Vogt
<mvo@debian.org>
Fri, 26 Jul 2013 20:18:36 +0000
(22:18 +0200)
apt-pkg/contrib/strutl.cc
patch
|
blob
|
blame
|
history
diff --git
a/apt-pkg/contrib/strutl.cc
b/apt-pkg/contrib/strutl.cc
index
d0e74d8
..
df02c34
100644
(file)
--- 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;