lavc/pnmdec: Fix 16bit decoding.

Regression since cdb5479c
Reported by irc user tTh from Mixart-Myrys
This commit is contained in:
Carl Eugen Hoyos 2019-12-13 19:10:15 +01:00
parent 24424a6516
commit 193143486e
1 changed files with 1 additions and 1 deletions

View File

@ -143,7 +143,7 @@ static int pnm_decode_frame(AVCodecContext *avctx, void *data,
v = (*s->bytestream++)&1;
} else {
/* read a sequence of digits */
for (k = 0; k < 5 && c <= 9; k += 1) {
for (k = 0; k < 6 && c <= 9; k += 1) {
v = 10*v + c;
c = (*s->bytestream++) - '0';
}