+ if (xz_result == XZ_STREAM_END) {
+ /*
+ * Try to start decoding next concatenated stream.
+ * Stream padding must always be a multiple of four
+ * bytes to preserve four-byte alignment. To keep the
+ * code slightly smaller, we aren't as strict here as
+ * the .xz spec requires. We just skip all zero-bytes
+ * without checking the alignment and thus can accept
+ * files that aren't valid, e.g. the XZ utils test
+ * files bad-0pad-empty.xz and bad-0catpad-empty.xz.
+ */
+ do {
+ if (membuf[iobuf.in_pos] != 0) {
+ xz_dec_reset(state);
+ goto do_run;
+ }
+ iobuf.in_pos++;
+ } while (iobuf.in_pos < iobuf.in_size);
+ }
+ do_run: