ZGlmZiAtLWdpdCBhL2FwL2FwcC9mbGFnc190b29sL3NyYy9tYWluLmMgYi9hcC9hcHAvZmxhZ3NfdG9vbC9zcmMvbWFpbi5jCm5ldyBmaWxlIG1vZGUgMTAwNzU1CmluZGV4IDAwMDAwMDAuLjQwMzM0OWUKLS0tIC9kZXYvbnVsbAorKysgYi9hcC9hcHAvZmxhZ3NfdG9vbC9zcmMvbWFpbi5jCkBAIC0wLDAgKzEsMzEwIEBACisvKioKKyogQGZpbGUgbWFpbi5jCisqIEBicmllZiBmbGFnc7fWx/i5pL7fCisqCisqIENvcHlyaWdodCAoQykgMjAyMyBTYW5lY2hpcHMgVGVjaG5vbG9neSBDby4sIEx0ZC4KKyogQGF1dGhvcgorKgorKiBUaGlzIHByb2dyYW0gaXMgZnJlZSBzb2Z0d2FyZTsgeW91IGNhbiByZWRpc3RyaWJ1dGUgaXQgYW5kL29yIG1vZGlmeQorKiBpdCB1bmRlciB0aGUgdGVybXMgb2YgdGhlIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIHZlcnNpb24gMiBhcworKiBwdWJsaXNoZWQgYnkgdGhlIEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbi4go6ix2NGho7pHUEx2MiBMaWNlbmNlo6kKKyoKKyovCisKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgSW5jbHVkZSBoZWFkZXIgZmlsZXMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworI2luY2x1ZGUgPHN0ZGlvLmg+CisjaW5jbHVkZSA8c3RkbGliLmg+CisjaW5jbHVkZSA8c3RyaW5nLmg+CisjaW5jbHVkZSA8c3lzL3R5cGVzLmg+CisjaW5jbHVkZSA8ZXJybm8uaD4KKyNpbmNsdWRlIDxzeXMvc3RhdC5oPgorI2luY2x1ZGUgPGZjbnRsLmg+CisjaW5jbHVkZSA8c3lzL2lvY3RsLmg+CisjaW5jbHVkZSA8ZGlyZW50Lmg+CisjaW5jbHVkZSA8Z2V0b3B0Lmg+CisjaW5jbHVkZSA8dW5pc3RkLmg+CisKKyNpbmNsdWRlICJwdWJfZmxhZ3MuaCIKKyNpbmNsdWRlICJmbGFnc19hcGkuaCIKKworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgIE1hY3JvIGRlZmluaXRpb25zICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICBUeXBlIGRlZmluaXRpb25zICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwordHlwZWRlZiBzdHJ1Y3QKK3sKKyAgICBpbnQJb3B0aW9uX3ZhbHVlOworICAgIGludCAoKmZ1bmMpKGNoYXIgKik7Cit9IG9wdGlvbl9oYW5kbGVfdDsKKworCisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKiAgICAgICAgICAgICAgICAgICAgICAgU3RhdGljIGZ1bmN0aW9uIGRlY2xhcmF0aW9ucyAgICAgICAgICAgICAgICAgICAgICAgICAgKgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KK3N0YXRpYyBpbnQgZXhjdXRlX2NvbW1hbmRfaGVscChjaGFyICpvcHRpb25fcGFyYSk7CitzdGF0aWMgaW50IGV4Y3V0ZV9jb21tYW5kX2luaXQoY2hhciAqb3B0aW9uX3BhcmEpOworc3RhdGljIGludCBleGN1dGVfY29tbWFuZF9nZXQoY2hhciAqb3B0aW9uX3BhcmEpOworc3RhdGljIGludCBleGN1dGVfY29tbWFuZF9zZXQoY2hhciAqb3B0aW9uX3BhcmEpOworc3RhdGljIGludCBleGN1dGVfY29tbWFuZF9nZXRfdWJpZnNfc3RhdHVzKGNoYXIgKm9wdGlvbl9wYXJhKTsKK3N0YXRpYyBpbnQgZXhjdXRlX2NvbW1hbmRfc2V0X3ViaWZzX3N0YXR1cyhjaGFyICpvcHRpb25fcGFyYSk7CisKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqICAgICAgICAgICAgICAgICAgICAgICBHbG9iYWwgdmFyaWFibGUgZGVjbGFyYXRpb25zICAgICAgICAgICAgICAgICAgICAgICAgICAqCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworc3RhdGljIGNoYXIgKiBnX3Nob3J0X3N0cmluZyA9ICJoaWdzdWIiOworCitzdGF0aWMgc3RydWN0IG9wdGlvbiBnX2xvbmdfb3B0aW9uc1tdID0KK3sKKyAgICB7ImhlbHAiLAkJCQlub19hcmd1bWVudCwJTlVMTCwJJ2gnfSwKKyAgICB7ImluaXQiLAkJCQlub19hcmd1bWVudCwJTlVMTCwJJ2knfSwKKyAgICB7ImdldCIsCQkJCQlub19hcmd1bWVudCwJTlVMTCwJJ2cnfSwKKyAgICB7InNldCIsCQkJCQlub19hcmd1bWVudCwJTlVMTCwJJ3MnfSwKKyAgICB7ImdldC11Ymlmcy1zdGF0dXMiLAlub19hcmd1bWVudCwJTlVMTCwJJ3UnfSwKKyAgICB7InNldC11Ymlmcy1zdGF0dXMiLAlub19hcmd1bWVudCwJTlVMTCwJJ2InfSwKKyAgICB7MCwgMCwgMCwgMH0KK307CisKK3N0YXRpYyBvcHRpb25faGFuZGxlX3QgZ19vcHRpb25faGFuZGxlW10gPQoreworICAgIHsnaCcsCQlleGN1dGVfY29tbWFuZF9oZWxwfSwKKyAgICB7J2knLAkJZXhjdXRlX2NvbW1hbmRfaW5pdH0sCisgICAgeydnJywJCWV4Y3V0ZV9jb21tYW5kX2dldH0sCisgICAgeydzJywJCWV4Y3V0ZV9jb21tYW5kX3NldH0sCisgICAgeyd1JywJCWV4Y3V0ZV9jb21tYW5kX2dldF91Ymlmc19zdGF0dXN9LAorICAgIHsnYicsCQlleGN1dGVfY29tbWFuZF9zZXRfdWJpZnNfc3RhdHVzfQorfTsKKworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICogICAgICAgICAgICAgICAgICAgICAgIFN0YXRpYyBmdW5jdGlvbiBkZWZpbmUgICAgICAgICAgICAgICAgICAgICAgICAgICoKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCitzdGF0aWMgdm9pZCB1c2FnZSh2b2lkKQoreworICAgIHByaW50ZigiZmxhZ3NfdG9vbCBbLWhpZ3N1Yl0gXG4gIgorCQkiIC1oLAktLWhlbHAgICAgICAgICAgICAgICAgICBzaG93IHVzYWdlIFxuIgorCQkiICAtaSwJLS1pbml0ICAgICAgICAgICAgICAgICAgaW5pdCBmbGFncyBcbiIKKwkJIiAgLWcsCS0tZ2V0ICAgICAgICAgICAgICAgICAgIGdldCBmbGFncyBkYXRhIFxuIgorCQkiICAtcywJLS1zZXQgICAgICAgICAgICAgICAgICAgc2V0IGZsYWdzIGRhdGEgXG4iCisJCSIgIC11LAktLWdldC11Ymlmcy1zdGF0dXMgICAgICBnZXQgdWJpZnMgc3RhdHVzIFxuIgorCQkiICAtYiwJLS1zZXQtdWJpZnMtc3RhdHVzICAgICAgc2V0IHViaWZzIHN0YXR1cyBcbiIpOworCisJcmV0dXJuOworfQorCisKK3N0YXRpYyBpbnQgZXhjdXRlX2NvbW1hbmRfaGVscChjaGFyICpvcHRpb25fcGFyYSkKK3sKKwl1c2FnZSgpOworCisJcmV0dXJuIDA7Cit9CisKKworc3RhdGljIGludCBleGN1dGVfY29tbWFuZF9pbml0KGNoYXIgKm9wdGlvbl9wYXJhKQoreworCWlmIChmbGFnc19pbml0KCkgIT0gMCkKKwl7CisJCXByaW50ZigiRXJyOiBmbGFncyBpbml0IGZhaWwgXG4iKTsKKwkJCisJCXJldHVybiAtMTsKKwl9CisJZWxzZQorCXsKKwkJcHJpbnRmKCJMb2c6IGZsYWdzIGluaXQgc3VjY2VzcyBcbiIpOworCQkKKwkgICAgcmV0dXJuIDA7CisJfQorfQorCisKK3N0YXRpYyBpbnQgZXhjdXRlX2NvbW1hbmRfZ2V0KGNoYXIgKm9wdGlvbl9wYXJhKQoreworCVRfRkxBR1NfSU5GTyBmbGFnc19pbmZvID0gezB9OworCisJaWYgKGZsYWdzX2dldCgmZmxhZ3NfaW5mbykgIT0gMCkKKwl7CisJCXByaW50ZigiRXJyOiBmbGFncyBnZXQgZmFpbCBcbiIpOworCQkKKwkJcmV0dXJuIC0xOworCX0KKwllbHNlCisJeworCQlwcmludGYoIm1hZ2ljX3N0YXJ0ICAgICAgICAgICAgICAgICAgICAgPSAweCV4IFxuIiwJZmxhZ3NfaW5mby5tYWdpY19zdGFydCk7CisJCQorCQlwcmludGYoImJvb3RfZm90YV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OworCWNoYXIgZnNfdWJpX3ZvbF9uYW1lWzE2XSA9ICJ2b2xOYW1lIjsKKworCXViaWZzX3N0YXR1cy5mc19zdGF0dXMgPSAyOworCXN0cm5jcHkodWJpZnNfc3RhdHVzLmZzX210ZF9uYW1lLCBmc19tdGRfbmFtZSwgc2l6ZW9mKHViaWZzX3N0YXR1cy5mc19tdGRfbmFtZSkpOworCXN0cm5jcHkodWJpZnNfc3RhdHVzLmZzX3ViaV92b2xfbmFtZSwgZnNfdWJpX3ZvbF9uYW1lLCBzaXplb2YodWJpZnNfc3RhdHVzLmZzX3ViaV92b2xfbmFtZSkpOworCisJaWYgKGZsYWdzX3NldF91Ymlmc19zdGF0dXMoJnViaWZzX3N0YXR1cykgIT0gMCkKKwl7CisJCXByaW50ZigiRXJyOiBzZXQgdWJpZnMgc3RhdHVzIGZhaWwgXG4iKTsKKwkJCisJCXJldHVybiAtMTsKKwl9CisJZWxzZQorCXsKKwkJcHJpbnRmKCJMb2c6IHNldCB1YmlmcyBzdGF0dXMgc3VjY2VzcyBcbiIpOworCQkKKwkJcmV0dXJuIDA7CisJfQorfQorCisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKiAgICAgICAgICAgICAgICAgICAgICAgR2xvYmFsIGZ1bmN0aW9uIGRlY2xhcmF0aW9ucyAgICAgICAgICAgICAgICAgICAgICAgICAgKgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KK2ludCBtYWluKGludCBhcmdjLCBjaGFyICphcmd2W10pCit7CisgICAgaW50IGkJCQkJPSAwOworICAgIGludCBvcHRpb25faW5kZXgJPSAwOworICAgIGludCBjbWRfbnVtCQk9IDA7CisKKyAgICBpbnQgcmV0CQkJPSAtMTsKKyAgICBpbnQgY2gJCQk9IC0xOworCisgICAgcHJpbnRmKCJMb2c6IGJ1aWxkIGRhdGU6ICVzICVzIFxuIiwgX19EQVRFX18sIF9fVElNRV9fKTsKKworICAgIHdoaWxlICgoY2ggPSBnZXRvcHRfbG9uZyhhcmdjLCBhcmd2LCBnX3Nob3J0X3N0cmluZywgZ19sb25nX29wdGlvbnMsICZvcHRpb25faW5kZXgpKSAhPSAtMSkKKyAgICB7CisgICAgICAgIGZvciAoaSA9IDA7IGkgPCBzaXplb2YoZ19vcHRpb25faGFuZGxlKSAvIHNpemVvZihvcHRpb25faGFuZGxlX3QpOyBpKyspCisgICAgICAgIHsKKyAgICAgICAgICAgIGlmIChjaCAhPSBnX29wdGlvbl9oYW5kbGVbaV0ub3B0aW9uX3ZhbHVlKQorICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIGNvbnRpbnVlOworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBjbWRfbnVtKys7CisKKyAgICAgICAgICAgIGlmIChOVUxMID09IGdfb3B0aW9uX2hhbmRsZVtpXS5mdW5jKQorICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIHByaW50ZigiRXJyOiBjb21tYW5kIHNob3J0IHN0cmluZyBpczogJWMsIGJ1dCBvcHRpb24gaGFuZGxlIGZ1bmMgaXMgTlVMTCBcbiIsIGNoKTsKKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgcmV0ID0gZ19vcHRpb25faGFuZGxlW2ldLmZ1bmMob3B0YXJnKTsKKyAgICAgICAgICAgIGlmIChyZXQgPCAwKQorICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIHJldCA9IC0xOworICAgICAgICAgICAgICAgIGdvdG8gZW5kOworICAgICAgICAgICAgfQorICAgICAgICB9CisgICAgfQorCisgICAgaWYgKDAgPT0gY21kX251bSkKKyAgICB7CisgICAgICAgIHByaW50ZigiRXJyOiBjYW4gbm90IGZpbmQgdmFsaWQgY29tbWFuZCBcbiIpOworICAgICAgICB1c2FnZSgpOworICAgICAgICByZXQgPSAtMTsKKyAgICAgICAgZ290byBlbmQ7CisgICAgfQorCisgICAgcmV0ID0gMDsKKworZW5kOgorICAgIHJldHVybiByZXQgOworfQorCg==