<div dir="ltr"><div dir="ltr">Hi Pablo,<div><br></div><div>   fixed; see commit c79879b4b4bd5991bb2a9e7142286c75906700d5</div></div></div><br><div class="gmail_quote"><div dir="ltr">On Mon, Dec 3, 2018 at 2:10 AM <a href="mailto:tesonep@gmail.com">tesonep@gmail.com</a> <<a href="mailto:tesonep@gmail.com">tesonep@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> <div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Good morning,<div>    I have seen that the latest version of the VM (at least the one build from the commit 649f3f16fc4ca9ce48d069a44aa79ea5d34d821a) presents a segmentation fault error when it is executed with a relative path to an image that does not contain directory.</div><div><br></div><div>Ex:</div><div><br></div><div>./Pharo Pharo.image</div><div><br></div><div>I have detected that the problem is with the implementation of the Security Plugin. I have seen that ioInitSecurity(void) of platforms/iOS/plugins/SecurityPlugin/sqUnixSecurity.c assumes that the path in the static variable imageFile has always a directory.</div><div><br></div><div>As it is looking for the position of '/'</div><div><br></div><div><div>sqInt ioInitSecurity(void)</div><div>{</div><div>  int imagePathLen= strrchr(imageName, '/') - imageName;</div><div>  char *squeakUserDirectory= 0;</div><div><br></div><div>  /* establish the secure user directory */</div><div>  strncpy(secureUserDirectory, imageName, imagePathLen);</div><div>  strcpy(secureUserDirectory + imagePathLen, "/secure");</div></div><div><div>...</div><div><br></div><div>As you can see this position is never found, and the return of strrchr is NULL, so the imagePathLen have a negative invalid value if the imageName does not contain a '/' character. </div><div><br></div><div>Also, I have seen that the existing version of the plugin has been replaced with the unix version. However, the OSX application that read the value of the parameters and initializes this static variable has not been updated to resolve the full path.</div><div>I have checked the version of the commit d8934ff and it works perfect with the previous version of the plugin.  </div><div><br></div><div>I am not sure if the solution is to revert the plugin to the original state or to update the parsing of the parameters to resolve the relative path to a full path. I will like to have more information about the original intention of the change. </div><div><br></div><div>Cheers,</div><div>Pablo</div><div><br></div>-- <br><div dir="ltr" class="m_7701657407889308786gmail_signature">Pablo Tesone.<br><a href="mailto:tesonep@gmail.com" target="_blank">tesonep@gmail.com</a></div></div></div></div></div></div></div></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><span style="font-size:small;border-collapse:separate"><div>_,,,^..^,,,_<br></div><div>best, Eliot</div></span></div></div></div>