fix loop with malformed ppm
skip_line in ppm parse was not testing for EOF, so it could get stuck with malformed files thanks Kyle-Kyle see https://github.com/libvips/libvips/issues/1377
This commit is contained in:
parent
3510e7abcf
commit
5e77ab948b
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,3 +1,4 @@
|
||||
fuzz/
|
||||
.pytest_cache
|
||||
compile
|
||||
.pytest_cache
|
||||
|
@ -2,6 +2,7 @@
|
||||
- better early shutdown in readers
|
||||
- don't attempt to save large XMP to jpeg [tnextday]
|
||||
- always fetch HEIC metadata from the main image [zhoux2016]
|
||||
- fix loop in malformed ppm [Kyle-Kyle]
|
||||
|
||||
24/5/19 started 8.8.1
|
||||
- improve realpath() use on older libc
|
||||
|
@ -89,7 +89,10 @@
|
||||
static void
|
||||
skip_line( FILE *fp )
|
||||
{
|
||||
while( vips__fgetc( fp ) != '\n' )
|
||||
int ch;
|
||||
|
||||
while( (ch = vips__fgetc( fp )) != '\n' &&
|
||||
ch != EOF )
|
||||
;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user