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

Make rnp_signature_handle_st C++ object #2279

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

desvxx
Copy link
Contributor

@desvxx desvxx commented Sep 30, 2024

fixes #2271

@desvxx desvxx force-pushed the desvxx-2271-refactor-rnp_signature_handle_st branch from 8a1f7db to 5a32290 Compare September 30, 2024 00:39
try {
(*handle)->sig = new pgp_subsig_t(sig->sig_pkt);
*handle =
new rnp_signature_handle_st(sig->ffi, nullptr, new pgp_subsig_t(sig->sig_pkt), true);

Check failure

Code scanning / CodeQL

Incorrect allocation-error handling High

This allocation cannot throw.
This catch block
is unnecessary.
try {
(*handle)->sig = new pgp_subsig_t(sig->sig_pkt);
*handle =
new rnp_signature_handle_st(sig->ffi, nullptr, new pgp_subsig_t(sig->sig_pkt), true);

Check failure

Code scanning / CodeQL

Incorrect allocation-error handling High

This allocation cannot throw.
This catch block
is unnecessary.
Copy link

codecov bot commented Sep 30, 2024

Codecov Report

Attention: Patch coverage is 76.92308% with 3 lines in your changes missing coverage. Please review.

Project coverage is 84.04%. Comparing base (16e6897) to head (5a32290).

Files with missing lines Patch % Lines
src/lib/rnp.cpp 72.72% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2279      +/-   ##
==========================================
- Coverage   84.04%   84.04%   -0.01%     
==========================================
  Files         114      114              
  Lines       23062    23046      -16     
==========================================
- Hits        19383    19368      -15     
+ Misses       3679     3678       -1     
Flag Coverage Δ
84.04% <76.92%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make rnp_signature_handle_st C++ object instead of using calloc.
1 participant