Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A possible issue in perl (perlio.c.patch) #4738

Closed
kaztost opened this issue Jan 3, 2020 · 1 comment
Closed

A possible issue in perl (perlio.c.patch) #4738

kaztost opened this issue Jan 3, 2020 · 1 comment
Labels
bug report Something is not working properly

Comments

@kaztost
Copy link

kaztost commented Jan 3, 2020

Problem description

The patch https://github.com/termux/termux-packages/blob/master/packages/perl/perlio.c.patch can make an issue in the code

Steps to reproduce

The considered fragment of perlio.c is

int fd = -1;
char tempname[] = "/tmp/PerlIO_XXXXXX";
const char * const tmpdir = TAINTING_get ? NULL : PerlEnv_getenv("TMPDIR");
SV * sv = NULL;
int old_umask = umask(0177);
if (tmpdir && tmpdir) {
/
if TMPDIR is set and not empty, we try that first */
sv = newSVpv(tmpdir, 0);
sv_catpv(sv, tempname + 4);
fd = Perl_my_mkstemp_cloexec(SvPVX(sv));
}

I think inserting the prefix in tempname makes "tempname + 4" wrong.

I do not know how exactly reproduce this issue runtime.


@ghost ghost added the bug report Something is not working properly label Jan 3, 2020
ghost pushed a commit that referenced this issue Jan 3, 2020
@ghost
Copy link

ghost commented Jan 3, 2020

Thanks, that should be fixed in 24856a6.

@ghost ghost closed this as completed Jan 3, 2020
Harshiv-Patel pushed a commit to Harshiv-Patel/termux-packages that referenced this issue Apr 28, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report Something is not working properly
Projects
None yet
Development

No branches or pull requests

1 participant