mirror of
https://github.com/Evolution-X/external_piex
synced 2026-02-01 07:35:29 +00:00
Fix an uninitialized memory read in PIEX am: bb217acdca
am: 945ea16b97
Change-Id: Idba4f663af887b1b10138436e84dda340f83cbd7
This commit is contained in:
@@ -165,11 +165,14 @@ bool FillPreviewImageData(const TiffDirectory& tiff_directory,
|
|||||||
// Get color_space
|
// Get color_space
|
||||||
if (tiff_directory.Has(kExifTagColorSpace)) {
|
if (tiff_directory.Has(kExifTagColorSpace)) {
|
||||||
std::uint32_t color_space;
|
std::uint32_t color_space;
|
||||||
success &= tiff_directory.Get(kExifTagColorSpace, &color_space);
|
if (tiff_directory.Get(kExifTagColorSpace, &color_space)) {
|
||||||
if (color_space == 1) {
|
if (color_space == 1) {
|
||||||
preview_image_data->color_space = PreviewImageData::kSrgb;
|
preview_image_data->color_space = PreviewImageData::kSrgb;
|
||||||
} else if (color_space == 65535 || color_space == 2) {
|
} else if (color_space == 65535 || color_space == 2) {
|
||||||
preview_image_data->color_space = PreviewImageData::kAdobeRgb;
|
preview_image_data->color_space = PreviewImageData::kAdobeRgb;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
success = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -163,7 +163,7 @@ bool GetFullDimension32(const tiff_directory::TiffDirectory& tiff_directory,
|
|||||||
std::uint32_t* width, std::uint32_t* height);
|
std::uint32_t* width, std::uint32_t* height);
|
||||||
|
|
||||||
// Reads the width and height of the crop information if available.
|
// Reads the width and height of the crop information if available.
|
||||||
// Returns false if an error occured.
|
// Returns false if an error occurred.
|
||||||
bool GetFullCropDimension(const tiff_directory::TiffDirectory& tiff_directory,
|
bool GetFullCropDimension(const tiff_directory::TiffDirectory& tiff_directory,
|
||||||
std::uint32_t* width, std::uint32_t* height);
|
std::uint32_t* width, std::uint32_t* height);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user