Menu

#347 Off-by-one error in "c44 -slice" or "c44 -bpp"

djvulibre
closed
nobody
None
5
2022-08-04
2022-08-04
Jakub Wilk
No

I can create an IW44 image with up to 64 chunks using c44 -bpp:

$ c44 -bpp $(perl -E 'say "1," x 63')1 foo.jpeg
$ djvudump foo.djvu | tail -n1
    BG44 [2]          IW4 data #64, 0 slices

But with c44 -slice, the limit is 63:

$ c44 -slice $(perl -E 'say "1," x 62')1 foo.jpeg
$ djvudump foo.djvu | tail -n1
    BG44 [2]          IW4 data #63, 0 slices

$ c44 -slice $(perl -E 'say "1," x 63')1 foo.jpeg

*** [1-17523] illegal slice specification (too many chunks)
*** (c44.cpp:388)
*** 'void parse_slice(const char*)'

Discussion

  • Leon Bottou

    Leon Bottou - 2022-08-04
    • status: open --> closed
     
  • Leon Bottou

    Leon Bottou - 2022-08-04

    Fixed (conservatively).
    The limit for -bpp is now 63.

     

Log in to post a comment.