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_DeadCode #1721

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions src/asn1.c
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ int asn1_length_from_der(size_t *len, const uint8_t **in, size_t *inlen)
// check if the left input is enough for reading (d,dlen)
if (*inlen < *len) {
error_print();
return -2; // Special error for test_asn1_length() // TODO: fix asn1test.c test vector
return -2; // Special error for test_asn1_length() // TODO: fix asn1test.c test vector
}
return 1;
}
Expand Down Expand Up @@ -411,11 +411,8 @@ int asn1_any_to_der(const uint8_t *a, size_t alen, uint8_t **out, size_t *outlen
}

if (!a) {
if (a) {
error_print();
return -1;
}
return 0;
error_print();
return -1;
}

if (out && *out) {
Expand Down Expand Up @@ -1157,7 +1154,7 @@ int asn1_object_identifier_print(FILE *fp, int format, int indent, const char *l
for (i = 0; i < nodes_cnt - 1; i++) {
fprintf(fp, "%d.", (int)nodes[i]);
}
fprintf(fp, "%d)", nodes[i]);
fprintf(fp, "%d)", (int)nodes[i]);
}
fprintf(fp, "\n");
return 1;
Expand Down