summaryrefslogtreecommitdiff
path: root/apt-pkg/cacheset.cc
diff options
context:
space:
mode:
authorMichael Vogt <mvo@debian.org>2014-01-26 08:15:29 +0100
committerMichael Vogt <mvo@debian.org>2014-01-26 08:15:29 +0100
commit796673c38509300c988fbba2f2679ba3c76916db (patch)
tree403055b486d0a1d65561528582d4b0bdc66e53a0 /apt-pkg/cacheset.cc
parent9aef3908c892f9d9349d8bf8a5ceaeea313ba0fe (diff)
parent2f958de6e883ba7b0c9895750d4dde35047f1e82 (diff)
Merge remote-tracking branch 'donkult/debian/sid' into debian/sid
Conflicts: apt-private/private-list.cc doc/po/de.po test/integration/framework
Diffstat (limited to 'apt-pkg/cacheset.cc')
-rw-r--r--apt-pkg/cacheset.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/apt-pkg/cacheset.cc b/apt-pkg/cacheset.cc
index 0147f7e86..29281aab9 100644
--- a/apt-pkg/cacheset.cc
+++ b/apt-pkg/cacheset.cc
@@ -73,6 +73,8 @@ bool PackageContainerInterface::FromTask(PackageContainerInterface * const pci,
const char *start, *end;
parser.GetRec(start,end);
unsigned int const length = end - start;
+ if (unlikely(length == 0))
+ continue;
char buf[length];
strncpy(buf, start, length);
buf[length-1] = '\0';