void RegKey::getBinary(const TCHAR* valname, void** data, int* length, void* def, int deflen) const {
  try {
    getBinary(valname, data, length);
  } catch(rdr::Exception&) {
    if (deflen) {
      *data = new char[deflen];
      memcpy(*data, def, deflen);
    } else
      *data = 0;
    *length = deflen;
  }
}
The software writes data past the end, or before the beginning, of the intended buffer.