diff options
author | Connor Abbott <cwabbott0@gmail.com> | 2022-02-15 12:29:56 +0100 |
---|---|---|
committer | Marge Bot <emma+marge@anholt.net> | 2022-02-19 01:25:46 +0000 |
commit | c21065c87a912aa317e05d27a3e914ffbf436c66 (patch) | |
tree | 404a6ba190698ff4fb96b8c2f388787947ad784c | |
parent | 6761550357b8fd97c4d224781ce1901c72fd40a0 (diff) |
util/blob: Clarify rules on blob::data
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15028>
-rw-r--r-- | src/util/blob.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/util/blob.h b/src/util/blob.h index e1e156eb43f..051eaa01674 100644 --- a/src/util/blob.h +++ b/src/util/blob.h @@ -47,7 +47,10 @@ extern "C" { */ struct blob { - /* The data actually written to the blob. */ + /* The data actually written to the blob. Never read or write this directly + * when serializing, use blob_reserve_* and blob_overwrite_* instead which + * check for out_of_memory and handle fixed-size blobs correctly. + */ uint8_t *data; /** Number of bytes that have been allocated for \c data. */ |