]> git.sesse.net Git - ffmpeg/commitdiff
avutil/common: warn about possible move of the data pointer after the last 0 byte...
authorMarton Balint <cus@passwd.hu>
Wed, 29 Jan 2020 22:56:07 +0000 (23:56 +0100)
committerMarton Balint <cus@passwd.hu>
Thu, 30 Jan 2020 23:15:13 +0000 (00:15 +0100)
Signed-off-by: Marton Balint <cus@passwd.hu>
libavutil/common.h

index e6f076a13c5aea043479e23646f3e70f5b1a19fa..142ff9abe7e200ad0a97841d9f0298272d823d4f 100644 (file)
@@ -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.
  *