Skip to content

Possible memory allocation bug in createPrependedArgv? #7

Description

@guillerodriguez

This line (https://github.com/axiak/java_posix_spawn/blob/master/src/c/jlinuxfork.c#L303):

pargv[i + 1] = (char *)malloc(3 * fds[i]);

should be allocating memory that is used later to sprintf an integer representing a fd. However the amount of memory allocated seems to be wrong (3 x the actual fd number).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions