diff options
author | Michael Vogt <michael.vogt@ubuntu.com> | 2013-04-30 10:44:16 +0200 |
---|---|---|
committer | Michael Vogt <michael.vogt@ubuntu.com> | 2013-04-30 10:44:16 +0200 |
commit | 3599bca5211077f5456a40adb5cec1bcbee8c3ae (patch) | |
tree | 221627b7ef4e3d6d294fbaaab425f2400734bd93 /apt-pkg/sourcelist.cc | |
parent | 6029901a2cf49aac035590960d84572b56f28933 (diff) | |
parent | b5595da902e62af7c295f1603ae5b43ba4cef281 (diff) |
merged from the debian-sid branch
Diffstat (limited to 'apt-pkg/sourcelist.cc')
-rw-r--r-- | apt-pkg/sourcelist.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/apt-pkg/sourcelist.cc b/apt-pkg/sourcelist.cc index 0fddfb451..0fd237cad 100644 --- a/apt-pkg/sourcelist.cc +++ b/apt-pkg/sourcelist.cc @@ -270,7 +270,11 @@ bool pkgSourceList::ReadAppend(string File) // CNC:2003-02-20 - Do not break if '#' is inside []. for (I = Buffer; *I != 0 && *I != '#'; I++) if (*I == '[') - I = strchr(I + 1, ']'); + { + char *b_end = strchr(I + 1, ']'); + if (b_end != NULL) + I = b_end; + } *I = 0; const char *C = _strstrip(Buffer); |