Lines Matching refs:length
31 int length = 0;
34 while (offset + 3 < jpeg.length && (jpeg[offset++] & 0xFF) == 0xFF) {
52 // Get the length and check if it is reasonable.
53 length = pack(jpeg, offset, 2, false);
54 if (length < 2 || offset + length > jpeg.length) {
55 Log.e(TAG, "Invalid length");
60 if (marker == 0xE1 && length >= 8 &&
64 length -= 8;
69 offset += length;
70 length = 0;
74 if (length > 8) {
85 if (count < 10 || count > length) {
90 length -= count;
94 while (count-- > 0 && length >= 12) {
114 length -= 12;
122 private static int pack(byte[] bytes, int offset, int length,
126 offset += length - 1;
131 while (length-- > 0) {