Re: [9fans] pngread: alloc chunk's length

2021-07-10 Thread adr via 9fans
Checking the sent mail I noticed that I forgot to remove mag... --- sys/src/cmd/jpg/readpng.c Thu Jan 24 23:39:55 2013 +++ /sys/src/cmd/jpg/readpng.c Sat Jul 10 13:09:13 2021 @@ -10,8 +10,6 @@ enum { - IDATSIZE = 100, - /* filtering algorithms */ FilterNone =

[9fans] pngread: alloc chunk's length

2021-07-10 Thread adr via 9fans
Hi, Png is using a fix size to allocate space for the chunks. I noticed it because it couldn't open some png files (the chunk size was bigger than IDATSIZE). This patch removes IDATSIZE and instead makes png to allocate the size of the chunk before reading it. --- sys/src/cmd/jpg/readpng.c