HCoop
/
ntk
/
apt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
rework some code to fix some scan-build warnings
[ntk/apt.git]
/
apt-pkg
/
cacheset.cc
diff --git
a/apt-pkg/cacheset.cc
b/apt-pkg/cacheset.cc
index
0147f7e
..
29281aa
100644
(file)
--- 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';