mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-01-16 09:00:26 +01:00
PS: Fix to never break the final ~> that terminates a base85 stream.
This was recently broken in commit 40d5082c24
which uses a base85-stream but without strings for encapsulating image
data. The bug was that the protection for ~> was only being applied
to the string encodings rather than all base85 streams.
We got lucky recently that the 24.8 change just happened to put the ~>
sequence on the line-wrap boundary so the test suite tripped up the
bug. Otherwise, we could have missed this for quite some time.
This commit is contained in:
parent
1df0b001b5
commit
67d543716e
1 changed files with 8 additions and 8 deletions
|
|
@ -1628,16 +1628,16 @@ _string_array_stream_write (cairo_output_stream_t *base,
|
|||
stream->column++;
|
||||
stream->string_size++;
|
||||
break;
|
||||
/* Have to also be careful to never split the final ~> sequence. */
|
||||
case '~':
|
||||
_cairo_output_stream_write (stream->output, &c, 1);
|
||||
stream->column++;
|
||||
stream->string_size++;
|
||||
length--;
|
||||
c = *data++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
/* Have to be careful to never split the final ~> sequence. */
|
||||
if (c == '~') {
|
||||
_cairo_output_stream_write (stream->output, &c, 1);
|
||||
stream->column++;
|
||||
stream->string_size++;
|
||||
length--;
|
||||
c = *data++;
|
||||
}
|
||||
_cairo_output_stream_write (stream->output, &c, 1);
|
||||
stream->column++;
|
||||
stream->string_size++;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue