+ j = 0;
+ *length = curuid->packet->data[j++];
+ if (*length < 192) {
+ /* length is correct */
+ } else if (*length < 255) {
+ *length -= 192;
+ *length <<= 8;
+ *length += curuid->packet->data[j++];
+ *length += 192;
+ } else {
+ *length = curuid->packet->data[j++];
+ *length <<= 8;
+ *length += curuid->packet->data[j++];
+ *length <<= 8;
+ *length += curuid->packet->data[j++];
+ *length <<= 8;
+ *length += curuid->packet->data[j++];
+ }
+ j++;
+ *length -= 17;
+ *photo = &(curuid->packet->data[j+16]);