From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-14) on finch.gentoo.org X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DMARC_NONE,MAILING_LIST_MULTI autolearn=unavailable autolearn_force=no version=4.0.0 Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by chiba.3jane.net (Postfix) with ESMTP id A74B420AAE48 for ; Wed, 20 Mar 2002 20:16:54 -0600 (CST) Received: (from dillon@localhost) by apollo.backplane.com (8.11.6/8.9.1) id g2L2Cxw87510; Wed, 20 Mar 2002 18:12:59 -0800 (PST) (envelope-from dillon) Date: Wed, 20 Mar 2002 18:12:59 -0800 (PST) From: Matthew Dillon Message-Id: <200203210212.g2L2Cxw87510@apollo.backplane.com> To: "Christian HOFFMANN" Cc: gentoo-dev@gentoo.org References: <3C990FDD.8746.BCF3B4@localhost> Subject: [gentoo-dev] Re: [BUG and PATCH] Does dcron need a space at the end of each Sender: gentoo-dev-admin@gentoo.org Errors-To: gentoo-dev-admin@gentoo.org X-BeenThere: gentoo-dev@gentoo.org X-Mailman-Version: 2.0.6 Precedence: bulk Reply-To: gentoo-dev@gentoo.org List-Help: List-Post: List-Subscribe: , List-Id: Gentoo Linux developer list List-Unsubscribe: , List-Archive: X-Archives-Salt: 6b2444db-e443-4fee-8124-c7e6f3979670 X-Archives-Hash: 30a1935a2841dfa5746a97385886faa9 :I just fired gdb to find the source of this problem and found the source :of the problem being at line 178 of database.c : :was: buf[strlen(ptr)-1] = 0; :is now on my system: buf[strlen(ptr)] = 0; : :This line was chopping 2 char at the end of the line the last one of the :command and the newline. You have to remove one char but indexing :starts at 0 and strlen give the number of char. : :I'm new to patch submission, howto ? : :Regards Well, I do not know who is maintaining the linux version of dcron. I maintain my master source but I don't think the linux sites are picking it up. In regards to this bug, I think the problem is that it should be 'ptr[strlen(ptr)-1] = 0' rather then 'buf[strlen(ptr)-1] = 0'. That is, it is trying to remove the newline at the end of the buffer. The bug occurs if you have spaces at the front of the line. Please try 'ptr[strlen(ptr)-1] = 0' and see if that solves your problem. -Matt