Phar timestamp is 32-bit

Open
#14,141 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
c, php
Domain
tooling

Research direction

Start with the _phar_entry_info definition shown in the issue and audit the Phar code paths that use its timestamp field. Done means the 32-bit timestamp limitation and any required file-format changes are addressed across Phar.

Written by the indexing model from the issue text.

Description

Bug Extension: phar Status: Verified
Description

From the definition of the entry info:

typedef struct _phar_entry_info {
	/* first bytes are exactly as in file */
	uint32_t                 uncompressed_filesize;
	uint32_t                 timestamp;

We can see that the timestamp is 32-bit... This will give problems in the near future and we should audit Phar's code such that this issue is gone. This might also imply changes to the file format.

PHP Version

All

Operating System

No response

Dominant language
C
Stars
40.4k
Forks
8.2k
Avg merge
2d 15h
Merged PRs (30d)
103

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from php/php-src

All issues in php/php-src

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.