diff options
| author | jsing <> | 2022-11-09 23:14:51 +0000 |
|---|---|---|
| committer | jsing <> | 2022-11-09 23:14:51 +0000 |
| commit | d89a1ecb343c2ab89fef9cffc0416fe82ae19995 (patch) | |
| tree | 3e2f73fdddc90b0f29f62bfd5ae22b20ae4d93b5 /src | |
| parent | cb1a13dca24ad9d305e999dab8b452335e27273f (diff) | |
| download | openbsd-d89a1ecb343c2ab89fef9cffc0416fe82ae19995.tar.gz openbsd-d89a1ecb343c2ab89fef9cffc0416fe82ae19995.tar.bz2 openbsd-d89a1ecb343c2ab89fef9cffc0416fe82ae19995.zip | |
Sync CBS_strdup() documentation update from libcrypto.
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/libssl/bytestring.h | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/lib/libssl/bytestring.h b/src/lib/libssl/bytestring.h index 022bc683a3..51284da8db 100644 --- a/src/lib/libssl/bytestring.h +++ b/src/lib/libssl/bytestring.h | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: bytestring.h,v 1.23 2022/01/06 14:30:30 jsing Exp $ */ | 1 | /* $OpenBSD: bytestring.h,v 1.24 2022/11/09 23:14:51 jsing Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2014, Google Inc. | 3 | * Copyright (c) 2014, Google Inc. |
| 4 | * | 4 | * |
| @@ -80,11 +80,9 @@ int CBS_stow(const CBS *cbs, uint8_t **out_ptr, size_t *out_len); | |||
| 80 | /* | 80 | /* |
| 81 | * CBS_strdup copies the current contents of |cbs| into |*out_ptr| as a | 81 | * CBS_strdup copies the current contents of |cbs| into |*out_ptr| as a |
| 82 | * NUL-terminated C string. If |*out_ptr| is not NULL, the contents are freed | 82 | * NUL-terminated C string. If |*out_ptr| is not NULL, the contents are freed |
| 83 | * with free. It returns one on success and zero on allocation | 83 | * with free. It returns one on success and zero on failure. On success, |
| 84 | * failure. On success, |*out_ptr| should be freed with free. | 84 | * |*out_ptr| should be freed with free. If |cbs| contains NUL bytes, |
| 85 | * | 85 | * CBS_strdup will fail. |
| 86 | * NOTE: If |cbs| contains NUL bytes, the string will be truncated. Call | ||
| 87 | * |CBS_contains_zero_byte(cbs)| to check for NUL bytes. | ||
| 88 | */ | 86 | */ |
| 89 | int CBS_strdup(const CBS *cbs, char **out_ptr); | 87 | int CBS_strdup(const CBS *cbs, char **out_ptr); |
| 90 | 88 | ||
