ZGlmZiAtLWdpdCBhL3Vwc3RyZWFtL2xpbnV4LTUuMTAvZHJpdmVycy9uZXQvenZuZXQvenZuZXRfZGV2LmMgYi91cHN0cmVhbS9saW51eC01LjEwL2RyaXZlcnMvbmV0L3p2bmV0L3p2bmV0X2Rldi5jCmluZGV4IGM3ZGE3YTQuLjJhOGZjYzMgMTAwNzU1Ci0tLSBhL3Vwc3RyZWFtL2xpbnV4LTUuMTAvZHJpdmVycy9uZXQvenZuZXQvenZuZXRfZGV2LmMKKysrIGIvdXBzdHJlYW0vbGludXgtNS4xMC9kcml2ZXJzL25ldC96dm5ldC96dm5ldF9kZXYuYwpAQCAtOCw3ICs4LDcgQEAKICNpbmNsdWRlICJ6dm5ldF9kZXYuaCINCiAjaW5jbHVkZSAicmFtX2NvbmZpZy5oIg0KICNpbmNsdWRlIDxuZXQvbmV0ZmlsdGVyL25mX2Nvbm50cmFjay5oPg0KLSNpbmNsdWRlIDxuZXQvU0kvZmFzdF9jb21tb24uaD4NCisNCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg0KICAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICBNYWNybyBkZWZpbml0aW9ucyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqDQogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8NCkBAIC03Miw4ICs3MiwxMCBAQAogbW9kdWxlX3BhcmFtKGdfd3JhcF9udW0sIGludCwgMDY0NCk7DQogdW5zaWduZWQgaW50IGdfd3JhcF90aW1lb3V0ID0gMTA7DQogbW9kdWxlX3BhcmFtKGdfd3JhcF90aW1lb3V0LCBpbnQsIDA2NDQpOw0KKy8qamIucWkgYWRkIGZvciBkZWJ1ZyBuZXR3b3JrIHBhY2thZ2Ugb24gMjAyNDA4MDYgc3RhcnQqLw0KIHVuc2lnbmVkIGludCBnX3RyYWNlX2xpbWl0ID0gMDsNCiBtb2R1bGVfcGFyYW0oZ190cmFjZV9saW1pdCwgaW50LCAwNjQ0KTsNCisvKmpiLnFpIGFkZCBmb3IgZGVidWcgbmV0d29yayBwYWNrYWdlIG9uIDIwMjQwODA2IGVuZCovDQogI2VuZGlmDQogDQogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioNCkBAIC04Myw2ICs4NSw3IEBACiBleHRlcm4gdm9pZCB2N19kbWFfbWFwX2FyZWEoY29uc3Qgdm9pZCAqLCBzaXplX3QsIGludCk7DQogZXh0ZXJuIHZvaWQgKmdldF9jdF9mb3JfYXAoc3RydWN0IHNrX2J1ZmYgKnNrYik7DQogZXh0ZXJuIHZvaWQgcHV0X2N0X2Zvcl9hcCh2b2lkICpjdCk7DQorZXh0ZXJuIHNwaW5sb2NrX3QgZmFzdF9md19zcGlubG9jazsNCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg0KICAqCQkJCQkgICBMb2NhbCBmdW5jdGlvbiBkZWNsYXJhdGlvbnMJCQkJCQkqDQogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8NCkBAIC0xMjUsNDEgKzEyOCwzOCBAQAogCXJldHVybiBOVUxMOw0KIH0NCiANCi0vKiBTdGFydGVkIGJ5IEFJQ29kZXIsIHBpZDoyZmEwODAzODFiYjJlM2QxNGZiYzBhYTQ0MDkxMjkxYTYwZDc4ZTM1ICovDQogdm9pZCBjaGVja19za2JfdGVzdChzdHJ1Y3Qgc2tfYnVmZiAqc2tiKQ0KIHsNCi0gICAgaWYgKHNrYiAmJiB2aXJfYWRkcl9hcCkgew0KLSAgICAgICAgc3RydWN0IHNrX2J1ZmYgKnRtcF9za2I7DQotICAgICAgICBpZiAoKHNrYi0+Y2FwSGVhZCAmJiAodmlydF90b19waHlzX2FwKHNrYi0+aGVhZCkgPT0gTlVMTCkpDQotICAgICAgICB8fCAoKHNrYi0+Y2FwSGVhZCA9PSBOVUxMKSAmJiB2aXJ0X3RvX3BoeXNfYXAoc2tiLT5oZWFkKSkpIHsNCi0gICAgICAgICAgICBkdW1wX3N0YWNrKCk7DQotICAgICAgICAgICAgcGFuaWMoImNhcEhlYWQgZXJyIik7DQotICAgICAgICB9DQotICAgICAgICBza2JfcXVldWVfd2FsaygmZ196dm5ldF9za2JfcXVldWUsIHRtcF9za2IpIHsNCi0gICAgICAgICAgICBpZiAodG1wX3NrYiA9PSBza2IpIHsNCi0gICAgICAgICAgICAgICAgZHVtcF9zdGFjaygpOw0KLSAgICAgICAgICAgICAgICBwYW5pYygiZHVwIGZyZWUiKTsNCi0gICAgICAgICAgICB9DQotICAgICAgICB9DQotICAgIH0NCisJaWYoc2tiICYmIHZpcl9hZGRyX2FwKXsNCisJCXN0cnVjdCBza19idWZmICp0bXBfc2tiOw0KKwkJaWYoKHNrYi0+Y2FwSGVhZCAmJiAodmlydF90b19waHlzX2FwKHNrYi0+aGVhZCkgPT0gTlVMTCkpDQorCQl8fCAoKHNrYi0+Y2FwSGVhZCA9PSBOVUxMKSAmJiB2aXJ0X3RvX3BoeXNfYXAoc2tiLT5oZWFkKSkpew0KKwkJCWR1bXBfc3RhY2soKTsNCisJCQltc2xlZXAoMTAwMCk7DQorCQkJcGFuaWMoImNhcEhlYWQgZXJyIik7DQorCQl9DQorCQlza2JfcXVldWVfd2FsaygmZ196dm5ldF9za2JfcXVldWUsIHRtcF9za2IpIHsNCisJCQlpZih0bXBfc2tiID09IHNrYil7DQorCQkJCWR1bXBfc3RhY2soKTsNCisJCQkJbXNsZWVwKDEwMDApOw0KKwkJCQlwYW5pYygiZHVwIGZyZWUiKTsNCisJCQl9DQorCQl9DQorCX0NC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ICB6dl9pbmZvKCIlZC0tLSUwMngsJTAyeCwlMDJ4LCUwMngsJTAyeCwlMDJ4LCUwMngsJTAyeCwlMDJ4LCUwMnhcbiIsIGksDQotICAgICAgICAgICAgICAgIGRhdGFbMCArIDEwICogaV0sIGRhdGFbMSArIDEwICogaV0sIGRhdGFbMiArIDEwICogaV0sIGRhdGFbMyArIDEwICogaV0sDQotICAgICAgICAgICAgICAgIGRhdGFbNCArIDEwICogaV0sIGRhdGFbNSArIDEwICogaV0sIGRhdGFbNiArIDEwICogaV0sIGRhdGFbNyArIDEwICogaV0sDQotICAgICAgICAgICAgICAgIGRhdGFbOCArIDEwICogaV0sIGRhdGFbOSArIDEwICogaV0pOw0KKyAgICBmb3IoaT0wOyBpPHZjb3VudDsgaSsrKSB7DQorICAgICAgICB6dl9pbmZvKCIlZC0tLTB4JXgsMHgleCwweCV4LDB4JXgsMHgleCwweCV4LDB4JXgsMHgleCwweCV4LDB4JXhcbiIsaSxza2ItPmRhdGFbMCsxMCppXSxza2ItPmRhdGFbMSsxMCppXSxza2ItPmRhdGFbMisxMCppXSwNCisgICAgICAgICAgICAgICAgc2tiLT5kYXRhWzMrMTAqaV0sc2tiLT5kYXRhWzQrMTAqaV0sc2tiLT5kYXRhWzUrMTAqaV0sc2tiLT5kYXRhWzYrMTAqaV0sc2tiLT5kYXRhWzcrMTAqaV0sc2tiLT5kYXRhWzgrMTAqaV0sc2tiLT5kYXRhWzkrMTAqaV0pOw0KICAgICB9DQotICAgIGlmICh2Y291bnQgPiAwKSB7DQotICAgICAgICBtZW1zZXQodG1wLCAwLCBzaXplb2YodG1wKSk7DQotICAgICAgICBzcHJpbnRmKHN0cmJ1ZiwgIiVkLS0tIiwgdmNvdW50KTsNCi0gICAgICAgIGNoYXIgKnAgPSBzdHJidWYgKyBzdHJsZW4oc3RyYnVmKTsNCisgICAgaWYodmNvdW50ID4gMCkgew0KKyAgICAgICAgbWVtc2V0KHRtcCwwLHNpemVvZih0bXApKTsNCisgICAgICA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