+ // IMPORTANT: accesses to the 'data' pointer are valid only for
+ // the first 'length+1' bytes (GNU specs says that the
+ // final NUL is not counted in length); using wxStrnlen()
+ // we make sure we don't access memory beyond the valid range
+ // (which otherwise may happen for invalid MO files):
+ offset += wxStrnlen(str, length - offset) + 1;