Send Motion-user mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.sourceforge.net/lists/listinfo/motion-user
or, via email, send a message with subject or body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Motion-user digest..."
Today's Topics:
1. whitespace parsing error in src/conf.c ... (daniel jordan)
2. Re: whitespace parsing error in src/conf.c ... (tosiara)
3. Re: whitespace parsing error in src/conf.c ... (daniel jordan)
----------------------------------------------------------------------
Message: 1
Date: Tue, 19 May 2020 16:27:59 -0700
From: daniel jordan <[email protected]>
To: [email protected]
Subject: [Motion-user] whitespace parsing error in src/conf.c ...
Message-ID:
<CAGkjMSNC6OO2H2w7VoBDbu-4u=8ucbs1fwqmzvqwgknw_gk...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
hellos.
I've created a patch file to fix a really small, yet rather annoying,
parsing error in src/conf.c.
Lines with all whitespace weren't handled correctly:
The terminator is correctly placed at line[1], however that means
strlen(line)
is 1,
not 0 as was being checked.
patch is here:
diff --git a/src/conf.c b/src/conf.c
index 49c0bbb..cef2404 100644
--- a/src/conf.c
+++ b/src/conf.c
@@ -2153,7 +2153,7 @@ static struct context **conf_process(struct context
**cnt, FILE *fp)
*(end+1) = '\0';
/* If line is only whitespace we continue to the next line. */
- if (strlen(line) == 0)
+ if (strlen(line) <= 1)
continue;
/* Trim leading whitespace from the line and find command. */
-daniel
-------------- next part --------------
An HTML attachment was scrubbed...
------------------------------
Message: 2
Date: Wed, 20 May 2020 08:25:49 +0300
From: tosiara <[email protected]>
To: Motion discussion list <[email protected]>
Subject: Re: [Motion-user] whitespace parsing error in src/conf.c ...
Message-ID:
<cachtdwrxtj3c4__txtisck1tcvlusqjwufccxp9gcv8_eac...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
Do you have a sample config file that I could try to reproduce?
On Wed, May 20, 2020, 02:29 daniel jordan <[email protected]> wrote:
> hellos.
>
> I've created a patch file to fix a really small, yet rather annoying,
> parsing error in src/conf.c.
> Lines with all whitespace weren't handled correctly:
> The terminator is correctly placed at line[1], however that means
> strlen(line)
> is 1,
> not 0 as was being checked.
>
> patch is here:
>
> diff --git a/src/conf.c b/src/conf.c
> index 49c0bbb..cef2404 100644
> --- a/src/conf.c
> +++ b/src/conf.c
> @@ -2153,7 +2153,7 @@ static struct context **conf_process(struct context
> **cnt, FILE *fp)
> *(end+1) = '\0';
>
> /* If line is only whitespace we continue to the next line. */
> - if (strlen(line) == 0)
> + if (strlen(line) <= 1)
> continue;
>
> /* Trim leading whitespace from the line and find command. */
>
> -daniel
>
>
> _______________________________________________
> Motion-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/motion-user
> https://motion-project.github.io/
>
> Unsubscribe: https://lists.sourceforge.net/lists/options/motion-user
-------------- next part --------------
An HTML attachment was scrubbed...
------------------------------
Message: 3
Date: Tue, 19 May 2020 22:30:36 -0700
From: daniel jordan <[email protected]>
To: Motion discussion list <[email protected]>
Subject: Re: [Motion-user] whitespace parsing error in src/conf.c ...
Message-ID:
<CAGkjMSNo0Zv+2n+ZJZvOWdLU5CNe8avZT=un0b_rwfcaz4m...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
Take any conf file you have.
Create a new line, enter a space and press enter to make a line break.
Save the file.
-daniel
On Tue, May 19, 2020 at 10:27 PM tosiara <[email protected]> wrote:
> Do you have a sample config file that I could try to reproduce?
>
> On Wed, May 20, 2020, 02:29 daniel jordan <[email protected]> wrote:
>
>> hellos.
>>
>> I've created a patch file to fix a really small, yet rather annoying,
>> parsing error in src/conf.c.
>> Lines with all whitespace weren't handled correctly:
>> The terminator is correctly placed at line[1], however that means
>> strlen(line)
>> is 1,
>> not 0 as was being checked.
>>
>> patch is here:
>>
>> diff --git a/src/conf.c b/src/conf.c
>> index 49c0bbb..cef2404 100644
>> --- a/src/conf.c
>> +++ b/src/conf.c
>> @@ -2153,7 +2153,7 @@ static struct context **conf_process(struct context
>> **cnt, FILE *fp)
>> *(end+1) = '\0';
>>
>> /* If line is only whitespace we continue to the next line.
>> */
>> - if (strlen(line) == 0)
>> + if (strlen(line) <= 1)
>> continue;
>>
>> /* Trim leading whitespace from the line and find command. */
>>
>> -daniel
>>
>>
>> _______________________________________________
>> Motion-user mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/motion-user
>> https://motion-project.github.io/
>>
>> Unsubscribe: https://lists.sourceforge.net/lists/options/motion-user
>
> _______________________________________________
> Motion-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/motion-user
> https://motion-project.github.io/
>
> Unsubscribe: https://lists.sourceforge.net/lists/options/motion-user
-------------- next part --------------
An HTML attachment was scrubbed...
------------------------------
------------------------------
Subject: Digest Footer
_______________________________________________
Motion-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/motion-user
------------------------------
End of Motion-user Digest, Vol 167, Issue 25
********************************************