Code: Strgrow(Str x)
 {
     char *old = x->ptr;
     int newlen;
    newlen = x->length * 6 / 5;
    if (newlen == x->length)
 	newlen += 2;
     x->ptr = GC_MALLOC_ATOMIC(newlen);
     x->area_size = newlen;
    bcopy((void *)old, (void *)x->ptr, x->length);
    GC_free(old);
}

Vulnerability Type: Overflow Mem. Corr. 
CWE ID: CWE-119
Summary: An issue was discovered in the Tatsuya Kinoshita w3m fork before 0.5.3-31. w3m allows remote attackers to cause memory corruption in certain conditions via a crafted HTML page.
Commit Message: Merge pull request #27 from kcwu/fix-strgrow

Fix potential heap buffer corruption due to Strgrow