<p></p>
<p><b>@rootkea</b> commented on this pull request.</p>

<hr>

<p>In <a href="https://github.com/geany/geany/pull/2960#discussion_r737976987">src/spawn.c</a>:</p>
<pre style='color:#555'>> @@ -694,7 +694,8 @@ static gboolean spawn_async_with_pipes(const gchar *working_directory, const gch
                        for (argc = 0; argv[argc]; argc++);
 
                full_argv = g_renew(gchar *, cl_argv, cl_argc + argc + 1);
-               memcpy(full_argv + cl_argc, argv, argc * sizeof(gchar *));
+               if (argv)
</pre>
<p>"If an argument to a function has an invalid value (such as a value outside the domain of the function, or a pointer outside the address space of the program, or <strong>a null pointer</strong>, or a pointer to non-modifiable storage when the corresponding parameter is not const-qualified) or a type (after promotion) not expected by a function with variable number of arguments, the <strong>behavior is undefined</strong>." - 7.1.4</p>
<p>Also,</p>
<p>"Where an argument declared as <code>size_t n</code> specifies the length of the array for a function, n can have the value zero on a call to that function. Unless explicitly stated otherwise in the description of a particular function in this subclause, pointer arguments on such a call shall still have valid values, as described in 7.1.4." - 7.24.1</p>
<p>Source: <a href="https://web.archive.org/web/20181230041359if_/http://www.open-std.org/jtc1/sc22/wg14/www/abq/c17_updated_proposed_fdis.pdf" rel="nofollow">https://web.archive.org/web/20181230041359if_/http://www.open-std.org/jtc1/sc22/wg14/www/abq/c17_updated_proposed_fdis.pdf</a></p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/geany/geany/pull/2960#discussion_r737976987">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAIOWJ7MDEKHVR3O2Q7AJMDUJCZITANCNFSM5G2EJMIA">unsubscribe</a>.<br />Triage notifications on the go with GitHub Mobile for <a href="https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675">iOS</a> or <a href="https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub">Android</a>.
<img src="https://github.com/notifications/beacon/AAIOWJYBH72MLTL27IHUYN3UJCZITA5CNFSM5G2EJMIKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOF4VJCDY.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/geany/geany/pull/2960#discussion_r737976987",
"url": "https://github.com/geany/geany/pull/2960#discussion_r737976987",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>