Просмотр исходного кода

* apt-pkg/indexrecords.cc:
- support '\r' in the Release file

Michael Vogt лет назад: 13
Родитель
Сommit
8d32611908
2 измененных файлов с 5 добавлено и 2 удалено
  1. 3 2
      apt-pkg/indexrecords.cc
  2. 2 0
      debian/changelog

+ 3 - 2
apt-pkg/indexrecords.cc

@@ -173,7 +173,7 @@ bool indexRecords::parseSumData(const char *&Start, const char *End,	/*{{{*/
    Hash = "";
    Size = 0;
    /* Skip over the first blank */
-   while ((*Start == '\t' || *Start == ' ' || *Start == '\n')
+   while ((*Start == '\t' || *Start == ' ' || *Start == '\n' || *Start == '\r')
 	  && Start < End)
       Start++;
    if (Start >= End)
@@ -215,7 +215,8 @@ bool indexRecords::parseSumData(const char *&Start, const char *End,	/*{{{*/
    
    EntryEnd = Start;
    /* Find the end of the third entry (the filename) */
-   while ((*EntryEnd != '\t' && *EntryEnd != ' ' && *EntryEnd != '\n')
+   while ((*EntryEnd != '\t' && *EntryEnd != ' ' && 
+           *EntryEnd != '\n' && *EntryEnd != '\r')
 	  && EntryEnd < End)
       EntryEnd++;
 

+ 2 - 0
debian/changelog

@@ -28,6 +28,8 @@ apt (0.9.7.8) UNRELEASED; urgency=low
       (LP: #1086997)
     - quote plus in filenames to work around a bug in the S3 server
       (LP: #1003633)
+  * apt-pkg/indexrecords.cc:
+    - support '\r' in the Release file
 
  -- Christian Perrier <bubulle@debian.org>  Mon, 24 Dec 2012 07:01:20 +0100