Uploaded image for project: 'Core ReactOS'
  1. Core ReactOS
  2. CORE-14837

RChangeServiceConfig*() miss some parameter checks

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • Services
    • None

    Description

      While working on CORE-14521, I noticed the following points. I guess they need fixing...

      See (MsDN) ChangeServiceConfig2A function.

      https://git.reactos.org/?p=reactos.git;a=blob;f=base/system/services/rpcserver.c;hb=bcec1fd6c37677d46d6890d270bb1e27d17f8f34

      • RChangeServiceConfigA() misses some parameter checks.
        For example, see RChangeServiceConfigW(), which has /* Check for invalid service type value */.
        • Not sure whether checks should be copied or RChangeServiceConfigA() rewritten to call RChangeServiceConfigW()...
      • RChangeServiceConfig2W() misses a check to reject invalid Info.dwInfoLevel values.
        See ChangeServiceConfig2W().
        • It currently defaults to ERROR_SUCCESS, which looks wrong in this case.
      • RChangeServiceConfig2A() "misses" a check to reject invalid Info.dwInfoLevel values.
        See ChangeServiceConfig2A().
        • It currently calls RChangeServiceConfig2W() with a partly uninitialized InfoW, which is acceptable with current code.

      Attachments

        Activity

          People

            bug zilla Bug Zilla
            Serge Gautherie Serge Gautherie
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: