Add some protection against opening multiple streams in the same file at the same time.

This commit is contained in:
Michael R Sweet
2022-07-04 13:03:11 -04:00
parent 50f27974cf
commit 067683cbcd
5 changed files with 33 additions and 7 deletions

View File

@@ -3239,13 +3239,13 @@ write_unit_file(
// Create some image objects...
fputs("pdfioFileCreateImageObjFromFile(\"testfiles/color.jpg\"): ", stdout);
if ((color_jpg = pdfioFileCreateImageObjFromFile(outpdf, "testfiles/color.jpg", true)) != NULL)
puts("PASS");
printf("PASS (%u)\n", (unsigned)pdfioObjGetNumber(color_jpg));
else
return (1);
fputs("pdfioFileCreateImageObjFromFile(\"testfiles/gray.jpg\"): ", stdout);
if ((gray_jpg = pdfioFileCreateImageObjFromFile(outpdf, "testfiles/gray.jpg", true)) != NULL)
puts("PASS");
printf("PASS (%u)\n", (unsigned)pdfioObjGetNumber(gray_jpg));
else
return (1);