Code: static unsigned short get_ushort(const unsigned char *data)
 {
    unsigned short val = *(const unsigned short *)data;
#ifdef OPJ_BIG_ENDIAN
    val = ((val & 0xffU) << 8) | (val >> 8);
#endif
    return val;
 }

Vulnerability Type: DoS 
CWE ID: CWE-787
Summary: An invalid write access was discovered in bin/jp2/convert.c in OpenJPEG 2.2.0, triggering a crash in the tgatoimage function. The vulnerability may lead to remote denial of service or possibly unspecified other impact.
Commit Message: tgatoimage(): avoid excessive memory allocation attempt, and fixes unaligned load (#995)