thewml / website-meta-language

An old offline HTML preprocessor (which can be used for static site generation), written in Perl and C that is still maintained for legacy reasons, but probably not recommended for new sites.
https://www.shlomifish.org/open-source/projects/website-meta-language/
GNU General Public License v2.0
14 stars 8 forks source link

argv[argc] must be NULL #2

Closed tonycoz closed 5 years ago

tonycoz commented 5 years ago

https://github.com/thewml/website-meta-language/blob/4b13b8a8e2347b08280a38929cd4e77dabdbdbb7/src/p3_eperl/eperl_main.c#L87

I don't know if that's the cause of the problem you raised in #p5p, but it is enforced recently (rather than possibly crashing).

shlomif commented 5 years ago

Thanks! Trying.

shlomif commented 5 years ago

Applied, but the problem persists - https://ci.appveyor.com/project/shlomif/website-meta-language/builds/20375344 .

tonycoz commented 5 years ago

On Sat, Nov 17, 2018 at 09:41:36AM -0800, Shlomi Fish wrote:

Applied, but the problem persists - https://ci.appveyor.com/project/shlomif/website-meta-language/builds/20375344 .

It may not make a difference, but your fix is incorrect:

You added:

myargv[myargc++] = NULL;

so if myargc was 2, it will be 3 and myargv[myargc] still won't be NULL.

This should be:

myargv[myargc] = NULL;

Tony

shlomif commented 5 years ago

On Sat, 17 Nov 2018 14:58:32 -0800 Tony Cook notifications@github.com wrote:

On Sat, Nov 17, 2018 at 09:41:36AM -0800, Shlomi Fish wrote:

Applied, but the problem persists - https://ci.appveyor.com/project/shlomif/website-meta-language/builds/20375344 .

It may not make a difference, but your fix is incorrect:

You added:

myargv[myargc++] = NULL;

so if myargc was 2, it will be 3 and myargv[myargc] still won't be NULL.

This should be:

myargv[myargc] = NULL;

Thanks, Tony! I meant it to be this way. Fixed now and pushed.

Tony

--

Shlomi Fish http://www.shlomifish.org/ Humanity - Parody of Modern Life - http://shlom.in/humanity

God signs people into the book of life using a pen that Chuck Norris gave him. — http://www.shlomifish.org/humour/bits/facts/Chuck-Norris/

Please reply to list if it's a mailing list post - http://shlom.in/reply .

shlomif commented 5 years ago

Still fails - https://ci.appveyor.com/project/shlomif/website-meta-language .