Browse Source

avutil/avsscanf: fix possible overreads when dealing with %c or %s

tags/n4.4
Paul B Mahol 4 years ago
parent
commit
13df9bfbcb
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavutil/avsscanf.c

+ 1
- 1
libavutil/avsscanf.c View File

@@ -113,7 +113,7 @@ static int ffshgetc(FFFILE *f)
} }


#define shlim(f, lim) ffshlim((f), (lim)) #define shlim(f, lim) ffshlim((f), (lim))
#define shgetc(f) (((f)->rpos != (f)->shend) ? *(f)->rpos++ : ffshgetc(f))
#define shgetc(f) (((f)->rpos < (f)->shend) ? *(f)->rpos++ : ffshgetc(f))
#define shunget(f) ((f)->shend ? (void)(f)->rpos-- : (void)0) #define shunget(f) ((f)->shend ? (void)(f)->rpos-- : (void)0)


static const unsigned char table[] = { -1, static const unsigned char table[] = { -1,


Loading…
Cancel
Save