[tex-live] extractbb can not read the pdf file generated by mutool
ABE Noriyuki
abenori at math.sci.hokudai.ac.jp
Wed Jan 6 10:55:06 CET 2016
Dear all,
I see. Now my question is
* should extractbb strictly reject an unexpected input?
I think Hirata-san's answer is "yes". If the answer is "yes", then I
agree with that we can't use mfgets. But the current extractbb (without
my patch) accepts an unexpected input.
This is a problem of the policy of dvipdfmx.
2016/01/06(Wed) 06:50:15, Shunsaku Hirata <shunsaku.hirata74 at gmail.com>:
> Hi,
>
> > Do you mean that, for example, "x ref" or "xre\0f" should be also
> > accepted? Otherwise, I think mfgets works.
>
> No, both "x ref" and "xre\0f" are invalid.
>
> mfgets() is supposed to return a pointer to null-terminated byte strings so
> it should not be used for reading data which can contain null characters
> within that.
>
> Consider the following example,
>
> xref
> \0 0 2
> 0000000000 00001 f
> 0000000032 00000 n
> 2 1 foo
> 0000000182 00000 n
> 3 1\0bar
> 0000000322 00000 n
> 4\01
> 0000001236 00000 n
>
> The first subsection is valid, the second subsection is not, and the
> third is not valid too. The last one is subtle. (I think it is invalid but
> if you want to treat null characters just like spaces it might be valid)
>
> I think the proposed patch won't treat all cases properly.
>
>
> Thanks,
>
> Shunsaku Hirata
Best,
Noriyuki
--
abenori at math.sci.hokudai.ac.jp
Department of Mathematics, Hokkaido University
More information about the tex-live
mailing list