merged lp:~mvo/apt/fix-inrelease5
[ntk/apt.git] / apt-pkg / indexrecords.cc
index 1461a24..e37a78c 100644 (file)
@@ -177,7 +177,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)
@@ -219,7 +219,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++;