( )⚙ D5257 manifest: also reject obviously-too-short lines when parsing lines

This is an archive of the discontinued Mercurial Phabricator instance.

manifest: also reject obviously-too-short lines when parsing lines
ClosedPublic

Authored by durin42 on Nov 12 2018, 8:52 PM.

Diff Detail

Repository
rHG Mercurial
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

durin42 created this revision.Nov 12 2018, 8:52 PM
yuja added a subscriber: yuja.Nov 13 2018, 6:38 AM

+ if ((next - data) < 22) {
+ /* We should have at least 22 bytes in a line:
+ 1 byte filename
+ 1 NUL
+ 20 bytes of hash

Queued, but I think it should be 40 bytes of hexadecimal hash.

This revision was automatically updated to reflect the committed changes.