Message ID | 20190916155502.17579-5-andreas.rheinhardt@gmail.com |
---|---|
State | New |
Headers | show |
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@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 [...]
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); }
Found via PVS-Studio (ticket #8156). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> --- libavformat/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)