[tlbuild] (fwd) [tex-live] Small bug in dvipdfm-x/pdfobj.c

Arthur Reutenauer arthur.reutenauer at normalesup.org
Tue May 13 02:20:05 CEST 2014


> since not all of you read the tex-live list, here an interesting
> patch.
> 
> Peter, anyone else, can you comment on this?

  Well, without knowing much of the dvipfmx code base, it seems clear
that the original code copies the content of data->values[0] to
data->values[1], then to data->values[2] (which is thus equal to
data->values[0]), then to data->values[3], etc., and hence it does
indeed clobber each element above index 0.  The code in the patch does
seem to do what is expected of an "unshift" (i. e., prepending an
element) ... except that it forgets the last element of the new array: I
think the code should be

+  for (i = data->size; i > 0; i--)
+    data->values[i+1] = data->values[i];

instead of "i" and "i-1" on the second line.  Or, alternatively, start
with "i = data->size+1", of course.  The value data->size is only
updated after that bit of code, so that seems correct.

	Best,

		Arthur, for "anyone else" ;-)



More information about the tlbuild mailing list