[FFmpeg-devel] [PATCH 5/5] avformat/utils: Fix always true check

Michael Niedermayer michael at niedermayer.cc
Tue Sep 17 14:16:49 EEST 2019


On Mon, Sep 16, 2019 at 05:55:02PM +0200, Andreas Rheinhardt wrote:
> Found via PVS-Studio (ticket #8156).
> 
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>
> ---
>  libavformat/utils.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libavformat/utils.c b/libavformat/utils.c
> index b83a740500..1cd7aa211c 100644
> --- a/libavformat/utils.c
> +++ b/libavformat/utils.c
> @@ -4837,7 +4837,7 @@ int ff_mkdir_p(const char *path)
>          }
>      }
>  
> -    if ((*(pos - 1) != '/') || (*(pos - 1) != '\\')) {
> +    if ((*(pos - 1) != '/') && (*(pos - 1) != '\\')) {
>          ret = mkdir(temp, 0755);
>      }

This should probably check for HAVE_DOS_PATH

thx

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Many that live deserve death. And some that die deserve life. Can you give
it to them? Then do not be too eager to deal out death in judgement. For
even the very wise cannot see all ends. -- Gandalf
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20190917/db0aea75/attachment.sig>


More information about the ffmpeg-devel mailing list