Skip to content

stop corrupting memory in libpsl-native SetDate - #6881

Merged
Travis Plunk (TravisEz13) merged 5 commits into
PowerShell:masterfrom
TravisEz13:fix_psl_native
May 18, 2018
Merged

stop corrupting memory in libpsl-native SetDate#6881
Travis Plunk (TravisEz13) merged 5 commits into
PowerShell:masterfrom
TravisEz13:fix_psl_native

Conversation

@TravisEz13

@TravisEz13 Travis Plunk (TravisEz13) commented May 16, 2018

Copy link
Copy Markdown
Member

PR Summary

stop corrupting memory in libpsl-native SetDate
Addresses #6872 - the first step

PR Checklist

return result;
}

return settimeofday(&tv, NULL);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we use settimeofday if we don't use second parameter (timezone)?
Could we use stime? In the case we have to adjust only one parameter time_t.

Second question do this parameter adjustements work correctly for ARM reverse byte order?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are known issues there this isn't working on ARM. Dan Travison (@dantraMSFT) mentioned this to me.

Feel free to file an issue to switch to stime, although the better fix is probably to include the timezone. This fix is scoped to stop corrupting memory.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems the timezone can be a issue too. We should look this in depth. Will push new Issue to discuss better solution.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tracking issue #6962

@iSazonov

Copy link
Copy Markdown
Collaborator

LGTM to get this in Preview3.

@TravisEz13
Travis Plunk (TravisEz13) merged commit b43d3e5 into PowerShell:master May 18, 2018
@TravisEz13
Travis Plunk (TravisEz13) deleted the fix_psl_native branch May 18, 2018 19:56
Thatgfsj (Thatgfsj) pushed a commit to Thatgfsj-contribs/PowerShell that referenced this pull request Aug 6, 2026
stop corrupting memory in libpsl-native SetDate
Addresses PowerShell#6872 - the first step
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants