include field separators in comparison
When comparing the first component of a multi-component string that uses a field separator (e.g., '/' or ':'), be sure to include the separator in the comparison to ensure that the comparison does not succeed due to a prefix match. Change-Id: Ieec3e73cb015a83bb652ec11cd7d83e57755c3d2
This commit is contained in:
@@ -944,7 +944,7 @@ pcert_verify(struct verify_options *opt, int argc, char **argv)
|
||||
if (ret)
|
||||
errx(1, "hx509_revoke_add_crl: %s: %d", s, ret);
|
||||
|
||||
} else if (strncmp(s, "ocsp:", 4) == 0) {
|
||||
} else if (strncmp(s, "ocsp:", 5) == 0) {
|
||||
s += 5;
|
||||
|
||||
ret = hx509_revoke_add_ocsp(context, revoke_ctx, s);
|
||||
@@ -1155,7 +1155,7 @@ revoke_print(struct revoke_print_options *opt, int argc, char **argv)
|
||||
if (ret)
|
||||
errx(1, "hx509_revoke_add_crl: %s: %d", s, ret);
|
||||
|
||||
} else if (strncmp(s, "ocsp:", 4) == 0) {
|
||||
} else if (strncmp(s, "ocsp:", 5) == 0) {
|
||||
s += 5;
|
||||
|
||||
ret = hx509_revoke_add_ocsp(context, revoke_ctx, s);
|
||||
|
Reference in New Issue
Block a user