Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix invalid pad length [v3] #413

Merged
merged 2 commits into from
Apr 15, 2019
Merged

Fix invalid pad length [v3] #413

merged 2 commits into from
Apr 15, 2019

Conversation

gunnsth
Copy link
Contributor

@gunnsth gunnsth commented Apr 14, 2019

Addresses #412

  • Fix when padLen == len(buf). Allows to clear entire buffer.

@gunnsth gunnsth added this to the v3.0.0-rc.1 milestone Apr 14, 2019
@gunnsth gunnsth requested a review from adrg April 14, 2019 22:51
@codecov
Copy link

codecov bot commented Apr 14, 2019

Codecov Report

Merging #413 into v3 will decrease coverage by 1.98%.
The diff coverage is 50%.

Impacted file tree graph

@@            Coverage Diff             @@
##               v3     #413      +/-   ##
==========================================
- Coverage   61.52%   59.53%   -1.99%     
==========================================
  Files         153      153              
  Lines       27761    27671      -90     
==========================================
- Hits        17079    16475     -604     
- Misses      10099    10825     +726     
+ Partials      583      371     -212
Impacted Files Coverage Δ
pdf/core/security/crypt/filter_aesv3.go 33.82% <50%> (ø) ⬆️
pdf/model/colorspace.go 23.63% <0%> (-14.12%) ⬇️
pdf/core/crypt.go 65.6% <0%> (-9.91%) ⬇️
pdf/model/annotations.go 13.37% <0%> (-9.74%) ⬇️
pdf/model/appender.go 83.08% <0%> (-7.63%) ⬇️
pdf/model/form.go 60.24% <0%> (-7.58%) ⬇️
pdf/model/page.go 54.52% <0%> (-6.97%) ⬇️
common/logging.go 51.02% <0%> (-6.88%) ⬇️
pdf/model/functions.go 31.34% <0%> (-6.85%) ⬇️
pdf/core/utils.go 42.06% <0%> (-6.44%) ⬇️
... and 11 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f8ac397...e0a57fd. Read the comment docs.

Copy link
Collaborator

@adrg adrg left a comment

Choose a reason for hiding this comment

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

The code looks correct. The padding length could potentially be equal to the size of the buffer.

@gunnsth gunnsth merged commit 01f3ac1 into v3 Apr 15, 2019
@gunnsth gunnsth deleted the v3-fix-invalid-pad-len branch April 15, 2019 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants