Coverage Report

Created: 2026-09-12 06:55

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/openssl41/include/internal/unicode.h
Line
Count
Source
1
/*
2
 * Copyright 2021-2026 The OpenSSL Project Authors. All Rights Reserved.
3
 *
4
 * Licensed under the Apache License 2.0 (the "License").  You may not use
5
 * this file except in compliance with the License.  You can obtain a copy
6
 * in the file LICENSE in the source distribution or at
7
 * https://www.openssl.org/source/license.html
8
 */
9
10
#ifndef OSSL_INTERNAL_UNICODE_H
11
#define OSSL_INTERNAL_UNICODE_H
12
#pragma once
13
14
#include <openssl/e_os2.h>
15
#include <stdint.h>
16
17
typedef enum {
18
    SURROGATE_MIN = UINT32_C(0xd800),
19
    SURROGATE_MAX = UINT32_C(0xdfff),
20
    UNICODE_MAX = UINT32_C(0x10ffff),
21
    UNICODE_LIMIT
22
} UNICODE_CONSTANTS;
23
24
static ossl_unused ossl_inline int is_unicode_surrogate(unsigned long value)
25
562M
{
26
562M
    return value >= SURROGATE_MIN && value <= SURROGATE_MAX;
27
562M
}
Unexecuted instantiation: a_strex.c:is_unicode_surrogate
a_utf8.c:is_unicode_surrogate
Line
Count
Source
25
51.0M
{
26
51.0M
    return value >= SURROGATE_MIN && value <= SURROGATE_MAX;
27
51.0M
}
a_mbstr.c:is_unicode_surrogate
Line
Count
Source
25
511M
{
26
511M
    return value >= SURROGATE_MIN && value <= SURROGATE_MAX;
27
511M
}
28
29
static ossl_unused ossl_inline int is_unicode_valid(unsigned long value)
30
511M
{
31
511M
    return value <= UNICODE_MAX && !is_unicode_surrogate(value);
32
511M
}
Unexecuted instantiation: a_strex.c:is_unicode_valid
Unexecuted instantiation: a_utf8.c:is_unicode_valid
a_mbstr.c:is_unicode_valid
Line
Count
Source
30
511M
{
31
511M
    return value <= UNICODE_MAX && !is_unicode_surrogate(value);
32
511M
}
33
34
#endif