]> arthur.barton.de Git - netatalk.git/blobdiff - etc/papd/file.c
merge papd changes from HEAD
[netatalk.git] / etc / papd / file.c
index 62e3c033eb35515fa2f8a010dcc18e535efdfd51..1517c0c380c1b2ba46c363473b6a2e1331957103 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: file.c,v 1.9 2002-01-04 04:45:47 sibaz Exp $
+ * $Id: file.c,v 1.9.12.1 2009-02-03 08:25:00 didg Exp $
  *
  * Copyright (c) 1990,1994 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -17,6 +17,8 @@
 
 #include "file.h"
 
+/* 
+*/
 int markline( pf, start, linelength, crlflength )
     char               **start;
     int                        *linelength, *crlflength;
@@ -53,6 +55,12 @@ int markline( pf, start, linelength, crlflength )
     (p[*crlflength]=='\r' || p[*crlflength]=='\n')) {
        (*crlflength)++;
     }
+    
+    if (!*crlflength) {
+        /* line is way too long, something fishy is going on, give up */
+        LOG(log_error, logtype_papd, "markline: no crlf in comment, give up" );
+        return( -2 );
+    }
 
     /* success, return 1 */
     return( 1 );