X-Git-Url: https://sigrok.org/gitweb/?p=libsigrok.git;a=blobdiff_plain;f=src%2Flibsigrok-internal.h;fp=src%2Flibsigrok-internal.h;h=b47a8e5d6e0542126d946cdf8ae8ae0a827684f2;hp=46865efc0b00dbcceb5751a65ea9af059859654e;hb=48b7c90166221e69aee1b618fe8ecced8be90f9b;hpb=1fa04876398ded830b40e44c8055e01c5e2fb977 diff --git a/src/libsigrok-internal.h b/src/libsigrok-internal.h index 46865efc..b47a8e5d 100644 --- a/src/libsigrok-internal.h +++ b/src/libsigrok-internal.h @@ -2240,7 +2240,8 @@ struct binary_value_spec { }; /** - * Read extract a value from a binary data image. + * Read extract a value from a binary data image, ensuring no out-of-bounds + * read happens. * * @param[out] out Pointer to output buffer (conversion result) * @param[in] spec Binary value specification @@ -2249,7 +2250,7 @@ struct binary_value_spec { * * @return SR_OK on success, SR_ERR_* error code on failure. */ -SR_PRIV int bv_get_value(float *out, const struct binary_value_spec *spec, +SR_PRIV int bv_get_value_len(float *out, const struct binary_value_spec *spec, const uint8_t *data, size_t length); /*--- crc.c -----------------------------------------------------------------*/