Changeset 26128

Show
Ignore:
Timestamp:
23.08.2012 15:26:26 (7 years ago)
Author:
kjdon
Message:

need to check if outlen < max_output_length. If inlen is greater than max output length then this was doing nothing, returning an empty string, so any strings > 255 chars were being converted to empty strings

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/common-src/indexers/mgpp/lib/unitool.cpp

    r25194 r26128  
    17141714  unsigned short *outhere = output+1; 
    17151715   
    1716   while (inhere <= inend && inlen < max_output_length-1) { 
     1716  while (inhere <= inend && outlen < max_output_length-1) { 
    17171717    /* decode the character */ 
    17181718    clen = parse_utf8_char (inhere, inend, &c);