[ https://issues.apache.org/jira/browse/DAEMON-85?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mladen Turk closed DAEMON-85. ----------------------------- Resolution: Won't Fix This is irrelevant issue, and it simplifies the command line parser ( check for extension), dot and exe (.exe) Use the longer names then 3 chars. > prunsrv.exe fails if filename is less than 4 characters long > ------------------------------------------------------------ > > Key: DAEMON-85 > URL: https://issues.apache.org/jira/browse/DAEMON-85 > Project: Commons Daemon > Issue Type: Bug > Affects Versions: 1.0.1 > Environment: Win2k > Reporter: Michael Goddard > > In cmdline.c, function apxCmdlineParse the following three lines check if the > length if arg[0] is greater than the length of .EXE. > However on windows, exe's can be executed without their .exe prefix. This > means, if prunsrv.exe is renamed to 3 characters or less, the check fails and > command line arguments arn't parsed returning an error. I could not figure > out why the check is there, it seems to serve no purpose and if commented out > the bug goes away. > Code at fault: > l = lstrlenW(_st_sys_argvw[0]); > if (l < EXE_SUFFIXLEN) > return NULL; > To reproduce: > 1. Rename prunsrv.exe to say abc.exe > 2. Execute the service executable directly as 'abc' in the current folder, do > not type 'abc.exe'. (useful to use when debugging the app) > 3. See it fail to parse command line arguments > To solve: > Remove offending lines. Perhaps check if arg[0] length is less than or equal > to 0 instead of 4, which would be a valid case to fail in. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]