1 |
:I just fired gdb to find the source of this problem and found the source |
2 |
:of the problem being at line 178 of database.c |
3 |
: |
4 |
:was: buf[strlen(ptr)-1] = 0; |
5 |
:is now on my system: buf[strlen(ptr)] = 0; |
6 |
: |
7 |
:This line was chopping 2 char at the end of the line the last one of the |
8 |
:command and the newline. You have to remove one char but indexing |
9 |
:starts at 0 and strlen give the number of char. |
10 |
: |
11 |
:I'm new to patch submission, howto ? |
12 |
: |
13 |
:Regards |
14 |
|
15 |
Well, I do not know who is maintaining the linux version of dcron. |
16 |
I maintain my master source but I don't think the linux sites are |
17 |
picking it up. |
18 |
|
19 |
In regards to this bug, I think the problem is that it should be |
20 |
'ptr[strlen(ptr)-1] = 0' rather then 'buf[strlen(ptr)-1] = 0'. |
21 |
That is, it is trying to remove the newline at the end of the |
22 |
buffer. The bug occurs if you have spaces at the front of the line. |
23 |
|
24 |
Please try 'ptr[strlen(ptr)-1] = 0' and see if that solves your |
25 |
problem. |
26 |
|
27 |
-Matt |