[Heimdal-source-changes] [heimdal/heimdal] c5db6e: IPC: Solaris doors backend: fix uninitialized vari...

GitHub noreply at github.com
Sön May 13 13:22:31 CEST 2018


  Branch: refs/heads/master
  Home:   https://github.com/heimdal/heimdal
  Commit: c5db6e691a1d9921fde23e54e8c7a5a579e3d565
      https://github.com/heimdal/heimdal/commit/c5db6e691a1d9921fde23e54e8c7a5a579e3d565
  Author: Luke Howard <lukeh at padl.com>
  Date:   2018-05-13 (Sun, 13 May 2018)

  Changed paths:
    M lib/ipc/server.c

  Log Message:
  -----------
  IPC: Solaris doors backend: fix uninitialized variables

When replying to a door call, if allocating the buffer using malloc()
fails, we return EAGAIN to the client to avoid it hanging, using a
variable on the stack. However in this case the code did not reset the
reply length, which would result in it reading past the end of the stack.
At the expense of a goto, this patch uses the same path for returning an
error as if it was generating by the application.

Also, ensure that reply->length is set to zero when returning an error;
it shouldn't affect the client as it will not read this in the event of
a non-zero return code, but it avoids leaking uninitialized memory.



      **NOTE:** This service been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/

      Functionality will be removed from GitHub.com on January 31st, 2019.


More information about the Heimdal-source-changes mailing list