]> arthur.barton.de Git - netatalk.git/commitdiff
Fix an error parsing afp.conf in the iniparser
authorRalph Boehme <sloowfranklin@gmail.com>
Fri, 21 Dec 2012 14:14:00 +0000 (15:14 +0100)
committerRalph Boehme <sloowfranklin@gmail.com>
Fri, 21 Dec 2012 14:14:00 +0000 (15:14 +0100)
Netatalk didn't start when the last line of the config file
afp.conf wasn't terminated by a newline. Fixes bug #476.

NEWS
libatalk/iniparser/iniparser.c

diff --git a/NEWS b/NEWS
index 76e845c297b82523ae447e29a79c93f561bef94a..3dce155fffc5a9a7a9031febbe384adcc8fe16db 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -20,6 +20,8 @@ Changes in 3.0.2
 * FIX: Fix a race condition between dbd and the cnid_dbd daemon
        which could result in users being disconnected from volumes
        when dbd was scanning their volumes. Fixes bug #477.
+* FIX: Netatalk didn't start when the last line of the config file
+       afp.conf wasn't terminated by a newline. Fixes bug #476.
 
 Changes in 3.0.1
 ================
index 5c741d25dfc9314e70b8dd2aab78531e9a316af7..c0514d9606838cf358595fdb87885b970413a62f 100644 (file)
@@ -574,14 +574,6 @@ dictionary * iniparser_load(const char * ininame)
         len = (int)strlen(line)-1;
         if (len==0)
             continue;
-        /* Safety check against buffer overflows */
-        if (line[len]!='\n') {
-            LOG(log_error, logtype_default, "iniparser: input line too long in \"%s\" (lineno: %d)",
-                ininame, lineno);
-            dictionary_del(dict);
-            fclose(in);
-            return NULL ;
-        }
         /* Get rid of \n and spaces at end of line */
         while ((len>=0) &&
                 ((line[len]=='\n') || (isspace(line[len])))) {