diff options
| author | Pierre Pronchery <pierre@freebsdfoundation.org> | 2023-08-02 16:26:43 +0000 |
|---|---|---|
| committer | Ed Maste <emaste@FreeBSD.org> | 2023-08-03 01:09:39 +0000 |
| commit | cf2fc1b0f5ce501f5a29d307294e5637e0f5aba6 (patch) | |
| tree | a2a5a488a727724dbe0c40f964fd21be2bf2d2c6 /apps/lib | |
| parent | b84c4564effd02dfdc047dd6cbeaf910bbb1a888 (diff) | |
Diffstat (limited to 'apps/lib')
| -rw-r--r-- | apps/lib/apps.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/apps/lib/apps.c b/apps/lib/apps.c index 79afa1deab99..4baeb352fedf 100644 --- a/apps/lib/apps.c +++ b/apps/lib/apps.c @@ -638,13 +638,13 @@ void *app_malloc(size_t sz, const char *what) char *next_item(char *opt) /* in list separated by comma and/or space */ { /* advance to separator (comma or whitespace), if any */ - while (*opt != ',' && !isspace(*opt) && *opt != '\0') + while (*opt != ',' && !isspace(_UC(*opt)) && *opt != '\0') opt++; if (*opt != '\0') { /* terminate current item */ *opt++ = '\0'; /* skip over any whitespace after separator */ - while (isspace(*opt)) + while (isspace(_UC(*opt))) opt++; } return *opt == '\0' ? NULL : opt; /* NULL indicates end of input */ @@ -1679,7 +1679,10 @@ CA_DB *load_index(const char *dbfile, DB_ATTR *db_attr) char *p = NCONF_get_string(dbattr_conf, NULL, "unique_subject"); if (p) { retdb->attributes.unique_subject = parse_yesno(p, 1); + } else { + ERR_clear_error(); } + } retdb->dbfname = OPENSSL_strdup(dbfile); @@ -2008,7 +2011,8 @@ int bio_to_mem(unsigned char **out, int maxlen, BIO *in) BIO_free(mem); return -1; } - maxlen -= len; + if (maxlen != -1) + maxlen -= len; if (maxlen == 0) break; |
