| Index: src/codec/SkRawCodec.cpp
|
| diff --git a/src/codec/SkRawCodec.cpp b/src/codec/SkRawCodec.cpp
|
| index 3b7b9a96eead8cc30c9e2718825cd30453449033..762e82364cd3a6dd27e7c6534f69f0d40d6c8eb4 100644
|
| --- a/src/codec/SkRawCodec.cpp
|
| +++ b/src/codec/SkRawCodec.cpp
|
| @@ -537,9 +537,12 @@ private:
|
| }
|
|
|
| // Check if the header is valid (endian info and magic number "42").
|
| - return
|
| - (header[0] == 0x49 && header[1] == 0x49 && header[2] == 0x2A && header[3] == 0x00) ||
|
| - (header[0] == 0x4D && header[1] == 0x4D && header[2] == 0x00 && header[3] == 0x2A);
|
| + bool littleEndian;
|
| + if (!is_valid_endian_marker(header, &littleEndian)) {
|
| + return false;
|
| + }
|
| +
|
| + return 0x2A == get_endian_short(header + 2, littleEndian);
|
| }
|
|
|
| void init(const int width, const int height, const dng_point& cfaPatternSize) {
|
|
|