You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Mladen Turk (JIRA)" <ji...@apache.org> on 2010/07/10 17:23:53 UTC

[jira] Resolved: (DAEMON-167) Procrun intermittently fails to set string values to the registry

     [ https://issues.apache.org/jira/browse/DAEMON-167?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mladen Turk resolved DAEMON-167.
--------------------------------

    Fix Version/s: 1.0.2
       Resolution: Fixed

Fixed in the trunk with r 962859.
Will be part of 1.0.3 release

> Procrun intermittently fails to set string values to the registry
> -----------------------------------------------------------------
>
>                 Key: DAEMON-167
>                 URL: https://issues.apache.org/jira/browse/DAEMON-167
>             Project: Commons Daemon
>          Issue Type: Bug
>          Components: Procrun
>    Affects Versions: Nightly Builds
>         Environment: Windows Server 2008 SP2 JPN (but I don't think the versions matter)
>            Reporter: Kamishima, Kiyoshi
>             Fix For: 1.0.2
>
>
> Due to an incorrect use of Win32 Registry APIs, Procrun intermittently fails to set string values to the registry and ends up failing to start itself up.
> As described in the following API reference page, cbData passed to RegSetValueEx function must include the size of the terminating null character.
> http://msdn.microsoft.com/en-us/library/ms724923.aspx
> However, apxRegistrySetStrA() and apxRegistrySetStrW() functions in Procrun codebase apparently neglect it.
> http://svn.apache.org/viewvc/commons/proper/daemon/trunk/src/native/nt/procrun/src/registry.c?revision=779922&view=markup
> In most cases, these off-by-one error is automatically compensated somewhere between API entry and the kernel, so the error is not apparent. But I have actually seen a case that the resulted registry value lacked the terminating null character and prevented the service from starting.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.