소스 검색

* apt-pkg/acquire-item.cc:
- Fix return value of pkgAcqFile::Custom600Headers() in the non-index
case, to avoid returning NULL and causing crashers in callers. This also
fixes a compiler warning.

martin@piware.de 16 년 전
부모
커밋
b26e2415ee
2개의 변경된 파일6개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      apt-pkg/acquire-item.cc
  2. 4 0
      debian/changelog

+ 2 - 0
apt-pkg/acquire-item.cc

@@ -1688,5 +1688,7 @@ string pkgAcqFile::Custom600Headers()
 {
 {
    if (IsIndexFile)
    if (IsIndexFile)
       return "\nIndex-File: true";
       return "\nIndex-File: true";
+   else
+      return "";
 }
 }
 									/*}}}*/
 									/*}}}*/

+ 4 - 0
debian/changelog

@@ -29,6 +29,10 @@ apt (0.7.26~exp5) UNRELEASED; urgency=low
   * Add test/test-indexes.sh:
   * Add test/test-indexes.sh:
     - Test behaviour of index retrieval and usage, in particular with
     - Test behaviour of index retrieval and usage, in particular with
       uncompressed and gzip compressed indexes.
       uncompressed and gzip compressed indexes.
+  * apt-pkg/acquire-item.cc:
+    - Fix return value of pkgAcqFile::Custom600Headers() in the non-index
+      case, to avoid returning NULL and causing crashers in callers. This also
+      fixes a compiler warning.
 
 
  -- Christian Perrier <bubulle@debian.org>  Tue, 11 May 2010 19:52:00 +0200
  -- Christian Perrier <bubulle@debian.org>  Tue, 11 May 2010 19:52:00 +0200