This is an archive of the discontinued Mercurial Phabricator instance.

chg: fix an undefined behavior about memcpy
ClosedPublic

Authored by quark on Jun 6 2018, 3:56 PM.

Details

Summary

Spot by Wez Furlong. memcpy(x, NULL, 0) is undefined according to [1].

[1]: https://stackoverflow.com/questions/5243012

Diff Detail

Repository
rHG Mercurial
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

quark created this revision.Jun 6 2018, 3:56 PM
quark edited the summary of this revision. (Show Details)Jun 6 2018, 3:58 PM
durin42 added a subscriber: durin42.Jun 6 2018, 4:02 PM

Lovely. Queued for stable, many thanks.

This revision was automatically updated to reflect the committed changes.