]> err.no Git - sope/commitdiff
fixed a bug in plist comment parsing
authorhelge <helge@e4a50df8-12e2-0310-a44c-efbce7f8a7e3>
Sun, 22 Jan 2006 22:28:07 +0000 (22:28 +0000)
committerhelge <helge@e4a50df8-12e2-0310-a44c-efbce7f8a7e3>
Sun, 22 Jan 2006 22:28:07 +0000 (22:28 +0000)
git-svn-id: http://svn.opengroupware.org/SOPE/trunk@1203 e4a50df8-12e2-0310-a44c-efbce7f8a7e3

sope-core/NGExtensions/ChangeLog
sope-core/NGExtensions/FdExt.subproj/NGPropertyListParser.m
sope-core/NGExtensions/Version

index b7ee72196239df6c854a5596286973950e886807..65be8081d9c81e99de919e85b21a991610bab8eb 100644 (file)
@@ -1,3 +1,8 @@
+2006-01-22  Helge Hess  <helge.hess@opengroupware.org>
+
+       * FdExt.subproj/NGPropertyListParser.m (_skipComments): fixed a bug
+         when parsing comments which contain stars (v4.5.181)
+
 2005-12-13  Helge Hess  <helge.hess@opengroupware.org>
 
        * NGQuotedPrintableCoding.m (NGDecodeQuotedPrintable): properly decode
index a62c20775edd0a5058913014f63ccad124a4b22d..f5c7e76eef59edb119f41cba2aa2ea6153cfc6eb 100644 (file)
@@ -525,20 +525,25 @@ static BOOL _skipComments(const unsigned char *_buffer, unsigned *_idx, unsigned
       
                 pos += 2; // skip '/*'
 
-                do { // search for '*/'
+                do { 
+                   // search for '*/'
                     while ((pos < _len) && (_buffer[pos] != '*'))
                         pos++;
-
-                    if (pos < _len) { // found '*'
-                        if ((pos + 1) < _len) {
-                            if (_buffer[pos + 1] == '/') { // found '*/'
-                                commentIsClosed = YES;
-                                pos += 2; // skip '*/'
-                                lookAgain = YES;
-                                break; // leave loop
-                            }
-                        }
-                    }
+                   
+                    if (pos + 1 >= _len)
+                       // did not find '*' or not enough left for '/'
+                       break;
+                   
+                   pos++; // skip '*'
+                   
+                   if (_buffer[pos] != '/')
+                       // missing slash in '*/'
+                       continue;
+                   
+                   commentIsClosed = YES;
+                   pos++; // skip '/'
+                   lookAgain = YES;
+                   break; // leave loop
                 }
                 while (pos < _len);
 
index 91ad9c031e80f662f0879e5233e0880ea2c053d4..2caa4b2997d819aaf2ba33ac7bd7c45e8cec7768 100644 (file)
@@ -1,6 +1,6 @@
 # version
 
-SUBMINOR_VERSION:=180
+SUBMINOR_VERSION:=181
 
 # v4.3.115 requires libFoundation v1.0.59
 # v4.2.72  requires libEOControl  v4.2.39