diff options
author | Michael Vogt <mvo@debian.org> | 2013-07-28 09:25:57 +0200 |
---|---|---|
committer | Michael Vogt <mvo@debian.org> | 2013-07-28 09:25:57 +0200 |
commit | 0c33605d981ceb78a4761e39043dc79ef9a571b2 (patch) | |
tree | 83fa22dda53f0abccd7b9cf7376af8553c559068 /apt-pkg/contrib/strutl.cc | |
parent | 402c0d19a0c6668d7710b2b48561eb3059a04584 (diff) | |
parent | 163dc55bd6891008adcdf6d683a94e890a00f8c7 (diff) |
Merge remote-tracking branch 'mvo/bugfix/coverity' into debian/sid
Diffstat (limited to 'apt-pkg/contrib/strutl.cc')
-rw-r--r-- | apt-pkg/contrib/strutl.cc | 6 |
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; |