Skip to content

refactor: Use operator== for equality tests of Node_format.#2545

Merged
iphydf merged 1 commit into
TokTok:masterfrom
iphydf:equals
Jan 11, 2024
Merged

refactor: Use operator== for equality tests of Node_format.#2545
iphydf merged 1 commit into
TokTok:masterfrom
iphydf:equals

Conversation

@iphydf
Copy link
Copy Markdown
Member

@iphydf iphydf commented Jan 11, 2024

It has padding bytes, so memcmp isn't necessarily safe. It is definitely unsafe for fuzzed node formats.


This change is Reviewable

@iphydf iphydf added this to the v0.2.19 milestone Jan 11, 2024
@iphydf iphydf force-pushed the equals branch 2 times, most recently from 2f31e05 to d69bc37 Compare January 11, 2024 13:23
@iphydf iphydf marked this pull request as ready for review January 11, 2024 13:23
It has padding bytes, so memcmp isn't necessarily safe. It is definitely
unsafe for fuzzed node formats.
@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 11, 2024

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (9592d59) 69.03% compared to head (af4cb31) 69.08%.

Files Patch % Lines
toxcore/network_test_util.cc 91.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2545      +/-   ##
==========================================
+ Coverage   69.03%   69.08%   +0.04%     
==========================================
  Files          96       96              
  Lines       28029    28042      +13     
==========================================
+ Hits        19350    19372      +22     
+ Misses       8679     8670       -9     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@iphydf iphydf merged commit af4cb31 into TokTok:master Jan 11, 2024
@iphydf iphydf deleted the equals branch January 11, 2024 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants