summaryrefslogtreecommitdiff
path: root/libavutil/common.h
diff options
context:
space:
mode:
authorMarton Balint <cus@passwd.hu>2020-01-29 23:56:07 +0100
committerMarton Balint <cus@passwd.hu>2020-01-31 00:15:13 +0100
commit6026384047ab8e895d416aab4e2531bd87c0c01d (patch)
treeb8f6a46956346741670f76315763cd544a170e0f /libavutil/common.h
parentd9f5fe4ed707d2d55680c8fd2eaf651a478af4c8 (diff)
avutil/common: warn about possible move of the data pointer after the last 0 byte in GET_UTF8
Signed-off-by: Marton Balint <cus@passwd.hu>
Diffstat (limited to 'libavutil/common.h')
-rw-r--r--libavutil/common.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavutil/common.h b/libavutil/common.h
index e6f076a13c..142ff9abe7 100644
--- a/libavutil/common.h
+++ b/libavutil/common.h
@@ -373,7 +373,9 @@ static av_always_inline av_const int av_parity_c(uint32_t v)
* @param GET_BYTE Expression reading one byte from the input.
* Evaluated up to 7 times (4 for the currently
* assigned Unicode range). With a memory buffer
- * input, this could be *ptr++.
+ * input, this could be *ptr++, or if you want to make sure
+ * that *ptr stops at the end of a NULL terminated string then
+ * *ptr ? *ptr++ : 0
* @param ERROR Expression to be evaluated on invalid input,
* typically a goto statement.
*