From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id F01C625C49 for ; Thu, 7 Jun 2018 12:45:54 -0400 (EDT) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id SQ2Cp8TbW-wp for ; Thu, 7 Jun 2018 12:45:54 -0400 (EDT) Received: from f506.i.mail.ru (f506.i.mail.ru [217.69.138.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id 2BBC425C41 for ; Thu, 7 Jun 2018 12:45:53 -0400 (EDT) From: =?UTF-8?B?SXZhbiBLb3B0ZWxvdg==?= Subject: [tarantool-patches] =?UTF-8?B?UmU6IFtQQVRDSF0gc3FsOiBhZGQgaW5kZXhfZGVmIHRvIHN0cnVjdCBJbmRl?= =?UTF-8?B?eCAoZml4ZWQgdmVyc2lvbiAjMik=?= MIME-Version: 1.0 Date: Thu, 07 Jun 2018 19:45:50 +0300 Message-ID: <1528389950.805011683@f506.i.mail.ru> Content-Type: multipart/alternative; boundary="--ALT--ixhgd3Un87Kt3P2a7cLSeRoBvNvOjw2h1528389950" In-Reply-To: <81e89dc5-a4f9-4dad-85d8-4b27692aaad6@tarantool.org> References: <1527497514.998361944@f317.i.mail.ru> <81e89dc5-a4f9-4dad-85d8-4b27692aaad6@tarantool.org> Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-subscribe: List-owner: List-post: List-archive: To: tarantool-patches@freelists.org Cc: =?UTF-8?B?VmxhZGlzbGF2IFNocGlsZXZveQ==?= ----ALT--ixhgd3Un87Kt3P2a7cLSeRoBvNvOjw2h1528389950 Content-Type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VycmVudEFkZHIodik7Ci0gICAgICAgIGlm IChuQ29sVGVzdCA9PSAxICYmIGluZGV4X2lzX3VuaXF1ZShwSWR4KSkgeworICAgICAgICBpZiAo bkNvbFRlc3QgPT0gMSAmJiBwSWR4LT5kZWYtPm9wdHMuaXNfdW5pcXVlKSB7CiAgICAgICAgICAg IC8qIEZvciBhIHNpbmdsZS1jb2x1bW4gVU5JUVVFIGluZGV4LCBvbmNlIHdlIGhhdmUgZm91bmQg YSBub24tTlVMTAogICAgICAgICAgICAgKiByb3csIHdlIGtub3cgdGhhdCBhbGwgdGhlIHJlc3Qg d2lsbCBiZSBkaXN0aW5jdCwgc28gc2tpcAogICAgICAgICAgICAgKiBzdWJzZXF1ZW50IGRpc3Rp bmN0bmVzcyB0ZXN0cy4KQEAgLTk3OSwxMiArOTc5LDEyIEBAIGFuYWx5emVPbmVUYWJsZShQYXJz ZSAqIHBQYXJzZSwgIC8qIFBhcnNlciBjb250ZXh0ICovCiAgICAgICAgICAgIFZkYmVDb3ZlcmFn ZSh2KTsKICAgICAgICAgfQogICAgICAgICBmb3IgKGkgPSAwOyBpIDwgbkNvbFRlc3Q7IGkrKykg ewotICAgICAgICAgICB1aW50MzJfdCBpZDsKICAgICAgICAgICAgc3RydWN0IGNvbGwgKmNvbGwg PQotICAgICAgICAgICAgICBzcWxfaW5kZXhfY29sbGF0aW9uKHBJZHgsIGksICZpZCk7CisgICAg ICAgICAgICAgIHBJZHgtPmRlZi0+a2V5X2RlZi0+cGFydHNbaV0uY29sbDsKICAgICAgICAgICAg c3FsaXRlM1ZkYmVBZGRPcDIodiwgT1BfSW50ZWdlciwgaSwgcmVnQ2huZyk7CiAgICAgICAgICAg IHNxbGl0ZTNWZGJlQWRkT3AzKHYsIE9QX0NvbHVtbiwgaUlkeEN1ciwKLSAgICAgICAgICAgICAg ICAgICBwSWR4LT5haUNvbHVtbltpXSwgcmVnVGVtcCk7CisgICAgICAgICAgICAgICAgICAgcElk eC0+ZGVmLT5rZXlfZGVmLT5wYXJ0c1tpXS5maWVsZG5vLAorICAgICAgICAgICAgICAgICAgIHJl Z1RlbXApOwogICAgICAgICAgICBhR290b0NobmdbaV0gPQogICAgICAgICAgICAgICAgc3FsaXRl M1ZkYmVBZGRPcDQodiwgT1BfTmUsIHJlZ1RlbXAsIDAsCiAgICAgICAgICAgICAgICAgICAgICAg IHJlZ1ByZXYgKyBpLCAoY2hhciAqKWNvbGwsCkBAIC0xMDA2LDcgKzEwMDYsNyBAQCBhbmFseXpl T25lVGFibGUoUGFyc2UgKiBwUGFyc2UsICAvKiBQYXJzZXIgY29udGV4dCAqLwogICAgICAgICBm b3IgKGkgPSAwOyBpIDwgbkNvbFRlc3Q7IGkrKykgewogICAgICAgICAgICBzcWxpdGUzVmRiZUp1 bXBIZXJlKHYsIGFHb3RvQ2huZ1tpXSk7CiAgICAgICAgICAgIHNxbGl0ZTNWZGJlQWRkT3AzKHYs IE9QX0NvbHVtbiwgaUlkeEN1ciwKLSAgICAgICAgICAgICAgICAgICBwSWR4LT5haUNvbHVtbltp XSwKKyAgICAgICAgICAgICAgICAgICBwSWR4LT5kZWYtPmtleV9kZWYtPnBhcnRzW2ldLmZpZWxk bm8sCiAgICAgICAgICAgICAgICAgICAgcmVnUHJldiArIGkpOwogICAgICAgICB9CiAgICAgICAg IHNxbGl0ZTNWZGJlUmVzb2x2ZUxhYmVsKHYsIGVuZERpc3RpbmN0VGVzdCk7CkBAIC0xMDIzLDE0 ICsxMDIzLDE0IEBAIGFuYWx5emVPbmVUYWJsZShQYXJzZSAqIHBQYXJzZSwgICAgLyogUGFyc2Vy IGNvbnRleHQgKi8KICAgICAgYXNzZXJ0KHJlZ0tleSA9PSAocmVnU3RhdDQgKyAyKSk7CiAgICAg IEluZGV4ICpwUGsgPSBzcWxpdGUzUHJpbWFyeUtleUluZGV4KHBJZHgtPnBUYWJsZSk7CiAgICAg IGludCBqLCBrLCByZWdLZXlTdGF0OwotICAgICBpbnQgblBrQ29sdW1uID0gKGludClpbm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nQoJnBJbmRleC0+cFRhYmxlLT5pZHhIYXNoLAorICAgICAg ICBwSW5kZXgtPmRlZi0+bmFtZSwgMCk7CiAgIGlmIChBTFdBWVMocEluZGV4KSkgewogICAgICBp ZiAocEluZGV4LT5wVGFibGUtPnBJbmRleCA9PSBwSW5kZXgpIHsKICAgICAgICAgcEluZGV4LT5w VGFibGUtPnBJbmRleCA9IHBJbmRleC0+cE5leHQ7CkBAIC0zODgsNyArMzkxLDcgQEAgZGVsZXRl VGFibGUoc3FsaXRlMyAqIGRiLCBUYWJsZSAqIHBUYWJsZSkKICAgICAgcE5leHQgPSBwSW5kZXgt PnBOZXh0OwogICAgICBhc3NlcnQocEluZGV4LT5wU2NoZW1hID09IHBUYWJsZS0+cFNjaGVtYSk7 CiAgICAgIGlmICgoZGIgPT0gMCB8fCBkYi0+cG5CeXRlc0ZyZWVkID09IDApKSB7Ci0gICAgICAg IGNoYXIgKnpOYW1lID0gcEluZGV4LT56TmFtZTsKKyAgICAgICAgY2hhciAqek5hbWUgPSBwSW5k ZXgtPmRlZi0+bmFtZTsKICAgICAgICAgVEVTVE9OTFkoSW5kZXggKgogICAgICAgICAgICAgcE9s ZCA9KSBzcWxpdGUzSGFzaEluc2VydCgmcFRhYmxlLT5pZHhIYXNoLAogICAgICAgICAgICAgICAg ICAgICAgICB6TmFtZSwgMCk7CkBAIC0xMDcyLDExICsxMDc1LDkgQEAgc3FsaXRlM0FkZENvbGxh dGVUeXBlKFBhcnNlICogcFBhcnNlLCBUb2tlbiAqIHBUb2tlbikKICAgICAgICogY29sbGF0aW9u IHR5cGUgd2FzIGFkZGVkLiBDb3JyZWN0IHRoaXMgaWYgaXQgaXMgdGhlIGNhc2UuCiAgICAgICAq LwogICAgICBmb3IgKHBJZHggPSBwLT5wSW5kZXg7IHBJZHg7IHBJZHggPSBwSWR4LT5wTmV4dCkg ewotICAgICAgICBhc3NlcnQocElkeC0+bkNvbHVtbiA9PSAxKTsKLSAgICAgICAgaWYgKHBJZHgt P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AgaSsrOwor ICB9CiAgIHJldHVybiAwOwogfQogCkBAIC0xNDEwLDEzICsxMzcxLDEzIEBAIHN0YXRpYyB2b2lk CiBjb252ZXJ0VG9XaXRob3V0Um93aWRUYWJsZShQYXJzZSAqIHBQYXJzZSwgVGFibGUgKiBwVGFi KQogewogICBJbmRleCAqcFBrOwotICBpbnQgaSwgajsKKyAgdWludDMyX3QgaSwgajsKICAgc3Fs aXRlMyAqZGIgPSBwUGFyc2UtPmRiOwogCiAgIC8qIE1hcmsgZXZlcnkgUFJJTUFSWSBLRVkgY29s dW1uIGFzIE5PVCBOVUxMIChleGNlcHQgZm9yIGltcG9zdGVyIHRhYmxlcykKICAgICovCiAgIGlm ICghZGItPmluaXQuaW1wb3N0ZXJUYWJsZSkgewotICAgICBmb3IgKGkgPSAwOyBpIDwgKGludClw VGFiLT5kZWYtPmZpZWxkX2NvdW50OyBpKyspIHsKKyAgICAgZm9yIChpID0gMDsgaSA8IHBUYWIt PmRlZi0+ZmllbGRfY291bnQ7IGkrKykgewogICAgICAgICBpZiAocFRhYi0+YUNvbFtpXS5pc19w cmlta2V5KSB7CiAgICAgICAgICAgIHBUYWItPmRlZi0+ZmllbGRzW2ldLm51bGxhYmxlX2FjdGlv bgogICAgICAgICAgICAgICA9IE9OX0NPTkZMSUNUX0FDVElPTl9BQk9SVDsKQEAgLTE0NTQsMTQg KzE0MTUsMTcgQEAgY29udmVydFRvV2l0aG91dFJvd2lkVGFibGUoUGFyc2UgKiBwUGFyc2UsIFRh YmxlICogcFRhYikKICAgICAgICogIlBSSU1BUlkgS0VZKGEsYixhLGIsYyxiLGMsZCkiIGludG8g anVzdCAiUFJJTUFSWSBLRVkoYSxiLGMsZCkiLiAgTGF0ZXIKICAgICAgICogY29kZSBhc3N1bWVz IHRoZSBQUklNQVJZIEtFWSBjb250YWlucyBubyByZXBlYXRlZCBjb2x1bW5zLgogICAgICAgKi8K LSAgICAgZm9yIChpID0gaiA9IDE7IGkgPCBwUGstPm5Db2x1bW47IGkrKykgewotICAgICAgICBp ZiAoaGFzQ29sdW1uKHBQay0+YWlDb2x1bW4sIGosIHBQay0+YWlDb2x1bW5baV0pKSB7Ci0gICAg ICAgICAgIHBQay0+bkNvbHVtbi0tOworICAgICBmb3IgKGkgPSBqID0gMTsgaSA8IHBQay0+ZGVm LT5rZXlfZGVmLT5wYXJ0X2NvdW50OyBpKyspIHsKKyAgICAgICAgaWYgKGhhc0NvbHVtbihwUGst PmRlZi0+a2V5X2RlZi0+cGFydHMsIGosCisgICAgICAgICAgICAgIHBQay0+ZGVmLT5rZXlfZGVm LT5wYXJ0c1tpXSkpIHsKKyAgICAgICAgICAgcFBrLT5kZWYtPmtleV9kZWYtPnBhcnRfY291bnQt LTsKICAgICAgICAgfSBlbHNlIHsKLSAgICAgICAgICAgcFBrLT5haUNvbHVtbltqKytdID0gcFBr LT5haUNvbHVtbltpXTsKKyAgICAgICAgICAgcFBrLT5kZWYtPmtleV9kZWYtPnBhcnRzW2orK10g PQorICAgICAgICAgICAgICAgICBwUGstPmRlZi0+a2V5X2RlZi0+cGFydHNbaV07CiAgICAgICAg IH0KICAgICAgfQotICAgICBwUGstPm5Db2x1bW4gPSBqOworCisgICAgIHBQay0+ZGVmLT5rZXlf ZGVmLT5wYXJ0X2NvdW50ID0gajsKICAgfQogICBhc3NlcnQocFBrICE9IDApOwogfQpAQCAtMTU0 Myw3ICsxNTA3LDcgQEAgY3JlYXRlSW5kZXgoUGFyc2UgKiBwUGFyc2UsIEluZGV4ICogcEluZGV4 LCBpbnQgaVNwYWNlSWQsIGludCBpSW5kZXhJZCwKICAgfQogICBzcWxpdGUzVmRiZUFkZE9wNCh2 LAogICAgICAgICAgIE9QX1N0cmluZzgsIDAsIGlGaXJzdENvbCArIDIsIDAsCi0gICAgICAgICAg c3FsaXRlM0RiU3RyRHVwKHBQYXJzZS0+ZGIsIHBJbmRleC0+ek5hbWUpLAorICAgICAgICAgIHNx bGl0ZTNEYlN0ckR1cChwUGFyc2UtPmRiL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AqbmFt ZSA9IHNwYWNlX2RlZi0+ZmllbGRzW2NvbHVtbl9leHByLT5pQ29sdW1uXS5uYW1lOworCisgICAg IGlmIChleHByLT5vcCA9PSBUS19DT0xMQVRFKXsKKyAgICAgICAgYXBwZW5kKHIsIG5hbWUsICZ0 b3RhbF9zcWxfc2l6ZSk7CisgICAgICAgIGFwcGVuZChyLCAiIENPTExBVEUgIiwgJnRvdGFsX3Nx bF9zaXplKTsKKyAgICAgICAgY29uc3QgY2hhciAqY29sbF9uYW1lID0gZXhwci0+dS56VG9rZW47 CisgICAgICAgIGFwcGVuZChyLCBjb2xsX25hbWUsICZ0b3RhbF9zcWxfc2l6ZSk7CisgICAgICAg IGFwcGVuZChyLCAiLCAiLCAmdG90YWxfc3FsX3NpemUpOworICAgICB9IGVsc2UgeworICAgICAg ICBhcHBlbmQociwgbmFtZSwgJnRvdGFsX3NxbF9zaXplKTsKKyAgICAgICAgYXBwZW5kKHIsICIs ICIsICZ0b3RhbF9zcWxfc2l6ZSk7CisgICAgIH0KKyAgfQorCisgIG1lbWNweShyZWdpb25fYWxs b2MociwgMSksICJcMCIsIDEpOworICB0b3RhbF9zcWxfc2l6ZSArPSAxOworICBjaGFyICpyZXMg PSByZWdpb25fam9pbihyLCB0b3RhbF9zcWxfc2l6ZSk7CisKKyAgLyoKKyAgICogZml4IGxhc3Qg IiwgIiB3aXRoICIpXDAiCisgICAqLworICByZXNbc3RybGVuKHJlcykgLSAyXSA9ICcpJzsKKyAg cmVzW3N0cmxlbihyZXMpIC0gMV0gPSAnXDAnOworICByZXR1cm4gcmVzOworfQorCit2b2lkCitz ZXRfaW5kZXhfZGVmKFBhcnNlICpwYXJzZSwgSW5kZXggKmluZGV4LCBUYWJsZSAqdGFibGUsIHVp bnQzMl90IGlpZCwKKyAgICAgY29uc3QgY2hhciAqbmFtZSwgdWludDMyX3QgbmFtZV9sZW4sIGlu dCBvbl9lcnJvciwKKyAgICAgRXhwckxpc3QgKmV4cHJfbGlzdCwgdTggaWR4X3R5cGUpCit7Cisg IHN0cnVjdCBzcGFjZV9kZWYgKnNwYWNlX2RlZiA9IHRhYmxlLT5kZWY7CisgIHN0cnVjdCBpbmRl eF9vcHRzIG9wdHM7CisgIGluZGV4X29wdHNfY3JlYXRlKCZvcHRzKTsKKyAgb3B0cy5pc191bmlx dWUgPSBvbl9lcnJvciAhPSBPTl9DT05GTElDVF9BQ1RJT05fTk9ORTsKKworICBzdHJ1Y3Qga2V5 X2RlZiAqa2V5X2RlZiA9IGtleV9kZWZfbmV3KGV4cHJfbGlzdC0+bkV4cHIpOworICBpZiAoa2V5 X2RlZiA9PSBOVUxMKQorICAgICByZXR1cm47CisKKyAgZm9yIChpbnQgaSA9IDA7IGkgPCBleHBy X2xpc3QtPm5FeHByOyBpKyspIHsKKyAgICAgRXhwciAqZXhwciA9IGV4cHJfbGlzdC0+YVtpXS5w RXhwcjsKKyAgICAgc3FsX3Jlc29sdmVfc2VsZl9yZWZlcmVuY2UocGFyc2UsIHRhYmxlLCBOQ19J ZHhFeHByLAorICAgICAgICAgICAgICBleHByLCAwKTsKKyAgICAgaWYgKHBhcnNlLT5uRXJyID4g MCkKKyAgICAgICAgcmV0dXJuOworCisgICAgIEV4cHIgKmNvbHVtbl9leHByID0gc3FsaXRlM0V4 cHJTa2lwQ29sbGF0ZShleHByKTsKKyAgICAgaWYgKGNvbHVtbl9leHByLT5vcCAhPSBUS19DT0xV TU4pIHsKKyAgICAgICAgc3FsaXRlM0Vycm9yTXNnKHBhcnNlLAorICAgICAgICAgICAgICAiZnVu Y3Rpb25hbCBpbmRleGVzIGFyZW4ndCBzdXBwb3J0ZWQgIgorICAgICAgICAgICAgICAiaW4gdGhl IGN1cnJlbnQgdmVyc2lvbiIpOworICAgICAgICByZXR1cm47CisgICAgIH0KKworICAgICB1aW50 MzJfdCBmaWVsZG5vID0gY29sdW1uX2V4cHItPmlDb2x1bW47CisKKyAgICAgdWludDMyX3QgY29s bF9pZDsKKyAgICAgc3RydWN0IGNvbGwgKmNvbGw7CisgICAgIGlmIChleHByLT5vcCA9PSBUS19D T0xMQVRFKQorICAgICAgICBjb2xsID0gc3FsX2dldF9jb2xsX3NlcShwYXJzZSwgZXhwci0+dS56 VG9rZW4sCisgICAgICAgICAgICAgICAgICZjb2xsX2lkKTsKKyAgICAgZWxzZQorICAgICAgICBj b2xsID0gc3FsX2NvbHVtbl9jb2xsYXRpb24oc3BhY2VfZGVmLCBmaWVsZG5vLAorICAgICAgICAg ICAgICAgICAmY29sbF9pZCk7CisKKyAgICAgaWYgKHNxbGl0ZTNTdHJJQ21wKGV4cHItPnUuelRv a2VuLCAiYmluYXJ5IikgIT0gMCAmJgorICAgICAgICAgY29sbCA9PSBOVUxMICYmIGV4cHItPm9w ID09IFRLX0NPTExBVEUpCisgICAgICAgIHJldHVybjsKKworICAgICAvKiBUYXJhbnRvb2w6IERF U0MgaW5kZXhlcyBhcmUgbm90IHN1cHBvcnRlZCBzbyBmYXIuCisgICAgICogU2VlIGdoLTMwMTYu CisgICAgICovCisgICAgIGtleV9kZWZfc2V0X3BhcnQoa2V5X2RlZiwgaSwgZmllbGRubywKKyAg ICAgICAgICAgc3BhY2VfZGVmLT5maWVsZHNbZmllbGRub10udHlwZSwKKyAgICAgICAgICAgc3Bh Y2VfZGVmLT5maWVsZHNbZmllbGRub10ubnVsbGFibGVfYWN0aW9uLAorICAgICAgICAgICBjb2xs LCBjb2xsX2lkLCBTT1JUX09SREVSX0FTQyk7CisgIH0KKworICBpZiAoaWR4X3R5cGUgPT0gU1FM SVRFX0lEWFRZUEVfQVBQREVGKQorICAgICBvcHRzLnNxbCA9IGNyZWF0ZV9zcWwobmFtZSwgdGFi bGUtPmRlZiwgZXhwcl9saXN0KTsKIAotICByZXR1cm4gdG50X2luZGV4LT5kZWYtPm9wdHMuaXNf dW5pcXVlOworICBzdHJ1Y3Qga2V5X2RlZiAqcGtfa2V5X2RlZjsKKyAgaWYgKGlkeF90eXBlID09 IFNRTElURV9JRFhUWVBFX0FQU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yAgLyogRXh0cmEgc3BhY2UgYWZ0 ZXIgdGhlIEluZGV4IG9iamVjdCAqLwogICBzdHJ1Y3Qgc2Vzc2lvbiAqdXNlcl9zZXNzaW9uID0g Y3VycmVudF9zZXNzaW9uKCk7CkBAIC0yOTM0LDI0ICsyOTk0LDI0IEBAIHNxbF9jcmVhdGVfaW5k ZXgoc3RydWN0IFBhcnNlICpwYXJzZSwgc3RydWN0IFRva2VuICp0b2tlbiwKICAgICogb3VyIG93 biBuYW1lLgogICAgKi8KICAgaWYgKHRva2VuKSB7Ci0gICAgIHpOYW1lID0gc3FsaXRlM05hbWVG cm9tVG9rZW4oZGIsIHRva2VuKTsKLSAgICAgaWYgKHpOYW1lID09IDApCisgICAgIG5hbWUgPSBz cWxpdGUzTmFtZUZyb21Ub2tlbihkYiwgdG9rZW4pOworICAgICBpZiAobmFtZSA9PSAwKQogICAg ICAgICBnb3RvIGV4aXRfY3JlYXRlX2luZGV4OwogICAgICBhc3NlcnQodG9rZW4tPnogIT0gMCk7 CiAgICAgIGlmICghZGItPmluaXQuYnVzeSkgewotICAgICAgICBpZiAoc3FsaXRlM0hhc2hGaW5k KCZkYi0+cFNjaGVtYS0+dGJsSGFzaCwgek5hbWUpICE9CisgICAgICAgIGlmIChzcWxpdGUzSGFz aEZpbmQoJmRiLT5wU2NoZW1hLT50YmxIYXNoLCBuYW1lKSAhPQogICAgICAgICAgICAgTlVMTCkg ewogICAgICAgICAgICBzcWxpdGUzRXJyb3JNc2cocGFyc2UsCiAgICAgICAgICAgICAgICAgICJ0 aGVyZSBpcyBhbHJlYWR5IGEgdGFibGUgbmFtZWQgJXMiLAotICAgICAgICAgICAgICAgICB6TmFt ZSk7CisgICAgICAgICAgICAgICAgIG5hbWUpOwogICAgICAgICAgICBnb3RvIGV4aXRfY3JlYXRl X2luZGV4OwogICAgICAgICB9CiAgICAgIH0KLSAgICAgaWYgKHNxbGl0ZTNIYXNoRmluZCgmcFRh Yi0+aWR4SGFzaCwgek5hbWUpICE9IE5VTEwpIHsKKyAgICAgaWYgKHNxbGl0ZTNIYXNoRmluZCgm cFRhYi0+aWR4SGFzaCwgbmFtZSkgIT0gTlVMTCkgewogICAgICAgICBpZiAoIWlmX25vdF9leGlz dCkgewogICAgICAgICAgICBzcWxpdGUzRXJyb3JNc2cocGFyc2UsCiAgICAgICAgICAgICAgICAg ICJpbmRleCAlcy4lcyBhbHJlYWR5IGV4aXN0cyIsCi0gICAgICAgICAgICAgICAgIHBUYWItPmRl Zi0+bmFtZSwgek5hbWUpOworICAgICAgICAgICAgICAgICBwVGFiLT5kZWYtPm5hbWUsIG5hbWUp OwogICAgICAgICB9IGVsc2UgewogICAgICAgICAgICBhc3NlcnQoIWRiLT5pbml0LmJ1c3kpOwog ICAgICAgICB9CkBAIC0yOTYzLDEwICszMDIzLDEwIEBAIHNxbF9jcmVhdGVfaW5kZXgoc3RydWN0 IFBhcnNlICpwYXJzZSwgc3RydWN0IFRva2VuICp0b2tlbiwKICAgICAgZm9yIChwTG9vcCA9IHBU YWItPnBJbmRleCwgbiA9IDE7IHBMb29wOwogICAgICAgICAgIHBMb29wID0gcExvb3AtPnBOZXh0 LCBuKyspIHsKICAgICAgfQotICAgICB6TmFtZSA9CisgICAgIG5hbWUgPQogICAgICAgICAgc3Fs aXRlM01QcmludGYoZGIsICJzcWxpdGVfYXV0b2luZGV4XyVzXyVkIiwgcFRhYi0+ZGVmLT5uYW1l LAogICAgICAgICAgICAgICBuKTsKLSAgICAgaWYgKHpOYW1lID09IDApIHsKKyAgICAgaWYgKG5h bWUgPT0gMCkgewogICAgICAgICBnb3RvIGV4aXRfY3JlYXRlX2luZGV4OwogICAgICB9CiAgIH0K QEAgLTMwMDYsMTcgKzMwNjYsMjQgQEAgc3FsX2NyZWF0ZV9pbmRleChzdHJ1Y3QgUGFyc2UgKnBh cnNlLCBzdHJ1Y3QgVG9rZW4gKnRva2VuLAogICAvKgogICAgKiBBbGxvY2F0ZSB0aGUgaW5kZXgg c3RydWN0dXJlL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SW5kZXgtPmFpQ29sdW1uW2ldID0gKGkxNikgajsKLSAgICAgfQotICAg ICBzdHJ1Y3QgY29sbCAqY29sbDsKLSAgICAgdWludDMyX3QgaWQ7Ci0gICAgIGlmIChjb2xfbGlz dEl0ZW0tPnBFeHByLT5vcCA9PSBUS19DT0xMQVRFKSB7Ci0gICAgICAgIGNvbnN0IGNoYXIgKmNv bGxfbmFtZSA9IGNvbF9saXN0SXRlbS0+cEV4cHItPnUuelRva2VuOwotICAgICAgICBjb2xsID0g c3FsX2dldF9jb2xsX3NlcShwYXJzZSwgY29sbF9uYW1lLCAmaWQpOwogCi0gICAgICAgIGlmIChj b2xsID09IE5VTEwgJiYKLSAgICAgICAgICAgIHNxbGl0ZTNTdHJJQ21wKGNvbGxfbmFtZSwgImJp bmFyeSIpICE9IDApIHsKLSAgICAgICAgICAgZ290byBleGl0X2NyZWF0ZV9pbmRleDsKLSAgICAg ICAgfQotICAgICB9IGVsc2UgaWYgKGogPj0gMCkgewotICAgICAgICBjb2xsID0gc3FsX2NvbHVt bl9jb2xsYXRpb24ocFRhYi0+ZGVmLCBqLCAmaWQpOwotICAgICB9IGVsc2UgewotICAgICAgICBp ZCA9IENPTExfTk9ORTsKLSAgICAgICAgY29sbCA9IE5VTEw7Ci0gICAgIH0KLSAgICAgcEluZGV4 LT5jb2xsX2FycmF5W2ldID0gY29sbDsKLSAgICAgcEluZGV4LT5jb2xsX2lkX2FycmF5W2ldID0g aWQ7Ci0KLSAgICAgLyogVGFyYW50b29sOiBERVNDIGluZGV4ZXMgYXJlIG5vdCBzdXBwb3J0ZWQg c28gZmFyLgotICAgICAgKiBTZWUgZ2gtMzAxNi4KLSAgICAgICovCi0gICAgIHBJbmRleC0+c29y dF9vcmRlcltpXSA9IFNPUlRfT1JERVJfQVNDOworICB1aW50MzJfdCBtYXhfaWlkID0gMDsKKyAg Zm9yIChJbmRleCAqaW5kZXggPSBwVGFiLT5wSW5kZXg7IGluZGV4OyBpbmRleCA9IGluZGV4LT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zc2VydChJc1VuaXF1ZUluZGV4KHBJbmRleCkp OwogCi0gICAgICAgIGlmIChwSWR4LT5uQ29sdW1uICE9IHBJbmRleC0+bkNvbHVtbikKKyAgICAg ICAgaWYgKHBJZHgtPmRlZi0+a2V5X2RlZi0+cGFydF9jb3VudCAhPQorICAgICAgICAgICAgICBw SW5kZXgtPmRlZi0+a2V5X2RlZi0+cGFydF9jb3VudCkKICAgICAgICAgICAgY29udGludWU7Ci0g ICAgICAgIGZvciAoayA9IDA7IGsgPCBwSWR4LT5uQ29sdW1uOyBrKyspIHsKLSAgICAgICAgICAg YXNzZXJ0KHBJZHgtPmFpQ29sdW1uW2tdID49IDApOwotICAgICAgICAgICBpZiAocElkeC0+YWlD b2x1bW5ba10gIT0gcEluZGV4LT5haUNvbHVtbltrXSkKKyAgICAgICAgZm9yIChrID0gMDsgayA8 IHBJZHgtPmRlZi0+a2V5X2RlZi0+cGFydF9jb3VudDsgaysrKSB7CisgICAgICAgICAgIGlmIChw SWR4LT5kZWYtPmtleV9kZWYtPnBhcnRzW2tdLmZpZWxkbm8gIT0gcEluZGV4LT5kZWYtPmtleV9k ZWYtPnBhcnRzW2tdLmZpZWxkbm8pCiAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICBz dHJ1Y3QgY29sbCAqY29sbDEsICpjb2xsMjsKLSAgICAgICAgICAgdWludDMyX3QgaWQ7Ci0gICAg ICAgICAgIGNvbGwxID0gc3FsX2luZGV4X2NvbGxhdGlvbihwSWR4LCBrLCAmaWQpOwotICAgICAg ICAgICBjb2xsMiA9IHNxbF9pbmRleF9jb2xsYXRpb24ocEluZGV4LCBrLCAmaWQpOworICAgICAg ICAgICBjb2xsMSA9IHBJZHgtPmRlZi0+a2V5X2RlZi0+cGFydHNba10uY29sbDsKKyAgICAgICAg ICAgY29sbDIgPSBwSW5kZXgtPmRlZi0+a2V5X2RlZi0+cGFydHNba10uY29sbDsKICAgICAgICAg ICAgaWYgKGNvbGwxICE9IGNvbGwyKQogICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgfQot ICAgICAgICBpZiAoayA9PSBwSWR4LT5uQ29sdW1uKSB7CisgICAgICAgIGlmIChrID09IHBJZHgt PmRlZi0+a2V5X2RlZi0+cGFydF9jb3VudCkgewogICAgICAgICAgICBpZiAocElkeC0+b25FcnJv ciAhPSBwSW5kZXgtPm9uRXJyb3IpIHsKICAgICAgICAgICAgICAgLyogVGhpcyBjb25zdHJhaW50 IGNyZWF0ZXMgdGhlIHNhbWUgaW5kZXggYXMgYSBwcmV2aW91cwogICAgICAgICAgICAgICAgKiBj b25zdHJhaW50IHNwZWNpZmllZCBzb21ld2hlcmUgaW4gdGhlIENSRUFURSBUQUJMRSBzdGF0ZW1l bnQuCkBAIC0zMTU5LDYgKzMxODksNyBAQCBzcWxfY3JlYXRlX2luZGV4KHN0cnVjdCBQYXJzZSAq cGFyc2UsIHN0cnVjdCBUb2tlbiAqdG9rZW4sCiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYg KGlkeF90eXBlID09IFNRTElURV9JRFhUWVBFX1BSSU1BUllLRVkpCiAgICAgICAgICAgICAgIHBJ ZHgtPmlkeFR5cGUgPSBpZHhfdHlwZTsKKwogICAgICAgICAgICBnb3RvIGV4aXRfY3JlYXRlX2lu ZGV4OwogICAgICAgICB9CiAgICAgIH0KQEAgLTMxNzAsNyArMzIwMSw3IEBAIHNxbF9jcmVhdGVf aW5kZXgoc3RydWN0IFBhcnNlICpwYXJzZSwgc3RydWN0IFRva2VuICp0b2tlbiwKICAgYXNzZXJ0 KHBhcnNlLT5uRXJyID09IDApOwogICBpZiAoZGItPmluaXQuYnVzeSkgewogICAgICBJbmRleCAq cDsKLSAgICAgcCA9IHNxbGl0ZTNIYXNoSW5zZXJ0KCZwVGFiLT5pZHhIYXNoLCBwSW5kZXgtPnpO YW1lLCBwSW5kZXgpOworICAgICBwID0gc3FsaXRlM0hhc2hJbnNlcnQoJnBUYWItPmlkeEhhc2gs IHBJbmRleC0+ZG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kZWYtPm9wdHMuaXNfdW5pcXVlKTsKIH0KIAogdm9pZApAQCAtMzkz MywxOCArMzkzNiwxOCBAQCBzcWxpdGUzVW5pcXVlQ29uc3RyYWludChQYXJzZSAqIHBQYXJzZSwg ICAgLyogUGFyc2luZyBjb250ZXh0ICovCiAgICAgKQogewogICBjaGFyICp6RXJyOwotICBpbnQg ajsKKyAgdWludDMyX3QgajsKICAgU3RyQWNjdW0gZXJyTXNnOwogICBUYWJsZSAqcFRhYiA9IHBJ ZHgtPnBUYWJsZTsKIAogICBzcWxpdGUzU3RyQWNjdW1Jbml0KCZlcnJNc2csIHBQYXJzZS0+ZGIs IDAsIDAsIDIwMCk7CiAgIGlmIChwSWR4LT5hQ29sRXhwcikgewotICAgICBzcWxpdGUzWFByaW50 ZigmZXJyTXNnLCAiaW5kZXggJyVxJyIsIHBJZHgtPnpOYW1lKTsKKyAgICAgc3FsaXRlM1hQcmlu dGYoJmVyck1zZywgImluZGV4ICclcSciLCBwSWR4LT5kZWYtPm5hbWUpOwogICB9IGVsc2Ugewot ICAgICBmb3IgKGogPSAwOyBqIDwgcElkeC0+bkNvbHVtbjsgaisrKSB7CisgICAgIGZvciAoaiA9 IDA7IGogPCBwSWR4LT5kZWYtPmtleV9kZWYtPnBhcnRfY291bnQ7IGorKykgewogICAgICAgICBj aGFyICp6Q29sOwotICAgICAgICBhc3NlcnQocElkeC0+YWlDb2x1bW5bal0gPj0gMCk7Ci0gICAg ICAgIHpDb2wgPSBwVGFiLT5kZWYtPmZpZWxkc1twSWR4LT5haUNvbHVtbltqXV0ubmFtZTsKKyAg ICAgICAgdWludDMyX3QgZmllbGRubyA9IHBJZHgtPmRlZi0+a2V5X2RlZi0+cGFydHNbal0uZmll bGRubzsKKyAgICAgICAgekNvbCA9IHBUYWItPmRlZi0+ZmllbGRzW2ZpZWxkbm9dLm5hbWU7CiAg ICAgICAgIGlmIChqKQogICAgICAgICAgICBzcWxpdGUzU3RyQWNjdW1BcHBlbmQoJmVyck1zZ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3FsL2RlbGV0ZS5jCkBAIC0yMDksNyArMjA5LDcgQEAgc3FsX3RhYmxlX2RlbGV0 ZV9mcm9tKHN0cnVjdCBQYXJzZSAqcGFyc2UsIHN0cnVjdCBTcmNMaXN0ICp0YWJfbGlzdCwKICAg ICAgfSBlbHNlIHsKICAgICAgICAgcGsgPSBzcWxpdGUzUHJpbWFyeUtleUluZGV4KHRhYmxlKTsK ICAgICAgICAgYXNzZXJ0KHBrICE9IE5VTEwpOwotICAgICAgICBwa19sZW4gPSBpbmRleF9jb2x1 bW5fY291bnQocGspOworICAgICAgICBwa19sZW4gPSBway0+ZGVmLT5rZXlfZGVmLT5wYXJ0X2Nv dW50OwogICAgICAgICBwYXJzZS0+bk1lbSArPSBwa19sZW47CiAgICAgICAgIHNxbGl0ZTNWZGJl QWRkT3AyKHYsIE9QX09wZW5URXBoZW1lcmFsLCBlcGhfY3Vyc29yLAogICAgICAgICAgICAgICAg IHBrX2xlbik7CkBAIC0yNTIsMTEgKzI1MiwxMSBAQCBzcWxfdGFibGVfZGVsZXRlX2Zyb20oc3Ry dWN0IFBhcnNlICpwYXJzZSwgc3RydWN0IFNyY0xpc3QgKnRhYl9saXN0LAogICAgICAvKiBFeHRy YWN0IHRoZSBwcmltYXJ5IGtleSBmb3IgdGhlIGN1cnJlbnQgcm93ICovCiAgICAgIGlmICghaXNf dmlldykgewogICAgICAgICBmb3IgKGludCBpID0gMDsgaSA8IHBrX2xlbjsgaSsrKSB7Ci0gICAg ICAgICAgIGFzc2VydChway0+YWlDb2x1bW5baV0gPj0gMCk7CiAgICAgICAgICAgIHNxbGl0ZTNF eHByQ29kZUdldENvbHVtbk9mVGFibGUodiwgdGFibGUtPmRlZiwKICAgICAgICAgICAgICAgICAg ICAgICAgdGFiX2N1cnNvciwKLSAgICAgICAgICAgICAgICAgICAgICAgcGstPgotICAgICAgICAg ICAgICAgICAgICAgICBhaUNvbHVtbltpXSwKKyAgICAgICAgICAgICAgICAgICAgICAgcGstPmRl Zi0+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2UocGFyc2UsIGNvbF9jbnQpOwogICBp ZiAocHJldiAhPSBOVUxMICYmIChyZWdfYmFzZSAhPSByZWdfcHJldiB8fAogICAgICAgICAgICAg IHByZXYtPnBQYXJ0SWR4V2hlcmUgIT0gTlVMTCkpCiAgICAgIHByZXYgPSBOVUxMOwogICBmb3Ig KGludCBqID0gMDsgaiA8IGNvbF9jbnQ7IGorKykgewotICAgICBpZiAocHJldiAhPSBOVUxMICYm IHByZXYtPmFpQ29sdW1uW2pdID09IGluZGV4LT5haUNvbHVtbltqXQotICAgICAgICAgJiYgcHJl di0+YWlDb2x1bW5bal0gIT0gWE5fRVhQUikgeworICAgICBpZiAocHJldi0+ZGVmLT5rZXlfZGVm LT5wYXJ0c1tqXS5maWVsZG5vID09CisgICAgICAgICBpbmRleC0+ZGVmLT5rZXlfZGVmLT5wYXJ0 c1tqXS5maWVsZG5vICYmIHByZXYgPT0gTlVMTCkgewogICAgICAgICAvKgogICAgICAgICAgKiBU aGlzIGNvbHVtbiB3YXMgYWxyZWFkeSBjb21wdXRlZCBieSB0aGUKICAgICAgICAgICogcHJldmlv dXMgaW5kZXguCmRpZmYgLS1naXQgYS9zcmMvYm94L3NxbC9leHByLmMgYi9zcmMvYm94L3NxbC9l eHByLmMKaW5kZXggODg2NmY2ZmVkLi45M2NkNDU0NzAgMTAwNjQ0Ci0tLSBhL3NyYy9ib3gvc3Fs L2V4cHIuYworKysgYi9zcmMvYm94L3NxbC9leHByLmMKQEAgLTI0MjIsMjEgKzI0MjIsMjAgQEAg c3FsaXRlM0ZpbmRJbkluZGV4KFBhcnNlICogcFBhcnNlLCAvKiBQYXJzaW5nIGNvbnRleHQgKi8K ICAgICAgICAgICAgICBwSWR4ID0gcElkeC0+cE5leHQpIHsKICAgICAgICAgICAgQml0bWFzayBj b2xVc2VkOyAvKiBDb2x1bW5zIG9mIHRoZSBpbmRleCB1c2VkICovCiAgICAgICAgICAgIEJpdG1h c2sgbUNvbDsgIC8qIE1hc2sgZm9yIHRoZSBjdXJyZW50IGNvbHVtbiAqLwotICAgICAgICAgICBp ZiAocElkeC0+bkNvbHVtbiA8IG5FeHByKQorICAgICAgICAgICBpZiAoKGludClwSWR4LT5kZWYt PmtleV9kZWYtPnBhcnRfY291bnQgPCBuRXhwcikKICAgICAgICAgICAgICAgY29udGludWU7CiAg ICAgICAgICAgIC8qIE1heGltdW0gbkNvbHVtbiBpcyBCTVMtMiwgbm90IEJNUy0xLCBzbyB0aGF0 IHdlIGNhbiBjb21wdXRlCiAgICAgICAgICAgICAqIEJJVE1BU0sobkV4cHIpIHdpdGhvdXQgb3Zl cmZsb3dpbmcKICAgICAgICAgICAgICovCi0gICAgICAgICAgIHRlc3RjYXNlKHBJZHgtPm5Db2x1 bW4gPT0gQk1TIC0gMik7Ci0gICAgICAgICAgIHRlc3RjYXNlKHBJZHgtPm5Db2x1bW4gPT0gQk1T IC0gMSk7Ci0gICAgICAgICAgIGlmIChwSWR4LT5uQ29sdW1uID49IEJNUyAtIDEpCisgICAgICAg ICAgIHRlc3RjYXNlKHBJZHgtPmRlZi0+a2V5X2RlZi0+cGFydF9jb3VudCA9PSBCTVMgLSAyKTsK KyAgICAgICAgICAgdGVzdGNhc2UocElkeC0+ZGVmLT5rZXlfZGVmLT5wYXJ0X2NvdW50ID09IEJN UyAtIDEpOworICAgICAgICAgICBpZiAocElkeC0+ZGVmLT5rZXlfZGVmLT5wYXJ0X2NvdW50ID49 IEJNUyAtIDEpCiAgICAgICAgICAgICAgIGNvbnRpbnVlOwogICAgICAgICAgICBpZiAobXVzdEJl VW5pcXVlKSB7Ci0gICAgICAgICAgICAgIGlmIChwSWR4LT5uQ29sdW1uID4gbkV4cHIKLSAgICAg ICAgICAgICAgICAgIHx8IChwSWR4LT5uQ29sdW1uID4gbkV4cHIKLSAgICAgICAgICAgICAgICAg ICYmICFpbmRleF9pc191bmlxdWUocElkeCkpKSB7Ci0gICAgICAgICAgICAgICAgICAgIGNvbnRp bnVlOyAgLyogVGhpcyBpbmRleCBpcyBub3QgdW5pcXVlIG92ZXIgdGhlIElOIFJIUyBjb2x1bW5z ICovCi0gICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgaWYgKChpbnQpcElkeC0+ZGVmLT5r ZXlfZGVmLT5wYXJ0X2NvdW50ID4gbkV4cHIKKyAgICAgICAgICAgICAgICAgIHx8ICFwSWR4LT5k ZWYtPm9wdHMuaXNfdW5pcXVlKQorICAgICAgICAgICAgICAgICAvKiBUaGlzIGluZGV4IGlzIG5v dCB1bmlxdWUgb3ZlciB0aGUgSU4gUkhTIGNvbHVtbnMgKi8KKyAgICAgICAgICAgICAgICAgICAg Y29udGludWU7CiAgICAgICAgICAgIH0KIAogICAgICAgICAgICBjb2xVc2VkID0gMDsgICAvKiBD b2x1bW5zIG9mIGluZGV4IHVzZWQgc28gZmFyICovCkBAIC0yNDQ5LDEyICsyNDQ4LDEzIEBAIHNx bGl0ZTNGaW5kSW5JbmRleChQYXJzZSAqIHBQYXJzZSwgLyogUGFyc2luZyBjb250ZXh0ICovCiAg ICAgICAgICAgICAgIGludCBqOwogCiAgICAgICAgICAgICAgIGZvciAoaiA9IDA7IGogPCBuRXhw cjsgaisrKSB7Ci0gICAgICAgICAgICAgICAgIGlmIChwSWR4LT5haUNvbHVtbltqXSAhPQotICAg ICAgICAgICAgICAgICAgICAgcFJocy0+aUNvbHVtbikgewotICAgICAgICAgICAgICAgICAgICBj b250aW51ZTsKLSAgICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgICBzdHJ1Y3QgY29s bCAqaWR4X2NvbGw7Ci0gICAgICAgICAgICAgICAgIGlkeF9jb2xsID0gc3FsX2luZGV4X2NvbGxh dGlvbihwSWR4LCBqLCAmaWQpOworICAgICAgICAgICAgICAgICBpZiAoKGludClwSWR4LT5kZWYt PmtleV9kZWYtPgorICAgICAgICAgICAgICAgICAgICBwYXJ0c1tqXS5maWVsZG5vCisgICAgICAg ICAgICAgICAgICAgICE9IHBSaHMtPmlDb2x1bW4pCisgICAgICAgICAgICAgICAgICAgICAgIGNv bnRpbnVlOworCisgICAgICAgICAgICAgICAgIHN0cnVjdCBjb2xsICppZHhfY29sbCA9CisgICAg ICAgICAgICAgICAgICAgIHBJZHgtPmRlZi0+a2V5X2RlZi0+cGFydHNbal0uY29sbDsKICAgICAg ICAgICAgICAgICAgaWYgKHBSZXEgIT0gTlVMTCAmJgogICAgICAgICAgICAgICAgICAgICAgcFJl cSAhPSBpZHhfY29sbCkgewogICAgICAgICAgICAgICAgICAgICBjb250aW51ZTsKQEAgLTI0ODMs MTIgKzI0ODMsMTIgQEAgc3FsaXRlM0ZpbmRJbkluZGV4KFBhcnNlICogcFBhcnNlLCAvKiBQYXJz aW5nIGNvbnRleHQgKi8KICAgICAgICAgICAgICAgICAgICAgICAwLCAwLCAwLAogICAgICAgICAg ICAgICAgICAgICAgIHNxbGl0ZTNNUHJpbnRmKGRiLAogICAgICAgICAgICAgICAgICAgICAgICJV U0lORyBJTkRFWCAlcyBGT1IgSU4tT1BFUkFUT1IiLAotICAgICAgICAgICAgICAgICAgICAgIHBJ ZHgtPnpOYW1lKSwKKyAgICAgICAgICAgICAgICAgICAgICBwSWR4LT5kZWYtPm5hbWUpLAogICAg ICAgICAgICAgICAgICAgICAgIFA0X0RZTkFNSUMpOwogICAgICAgICAgICAgICBlbWl0X29wZW5f Y3Vyc29yKHBQYXJzZSwgaVRhYiwKICAgICAgICAgICAgICAgICAgICAgIHBJZHgtPnRudW0pOwog ICAgICAgICAgICAgICBzcWxfdmRiZV9zZXRfcDRfa2V5X2RlZihwUGFyc2UsIHBJZHgpOwotICAg ICAgICAgICAgICBWZGJlQ29tbWVudCgodiwgIiVzIiwgcElkeC0+ek5hbWUpKTsKKyAgICAgICAg ICAgICAgVmRiZUNvbW1lbnQoKHYsICIlcyIsIHBJZHgtPmRlZi0+bmFtZSkpOwogICAgICAgICAg ICAgICBhc3NlcnQoSU5fSU5ERVhfSU5ERVhfREVTQyA9PQogICAgICAgICAgICAgICAgICAgICAg SU5fSU5ERVhfSU5ERVhfQVNDICsgMSk7CiAgICAgICAgICAgICAgIGVUeXBlID0gSU5fSU5ERVhf SU5ERVhfQVNDICsKQEAgLTI1MTUsNyArMjUxNSw3IEBAIHNxbGl0ZTNGaW5kSW5JbmRleChQYXJz ZSAqIHBQYXJzZSwgICAvKiBQYXJzaW5nIGNvbnRleHQgKi8KICAgICAgICAgICAgICAgICAgICAg LyogVGFyYW50b29sOiBDaGVjayBmb3IgbnVsbCBpcyBwZXJmb3JtZWQgb24gZmlyc3Qga2V5IG9m IHRoZSBpbmRleC4gICovCiAgICAgICAgICAgICAgICAgICAgIHNxbGl0ZTNTZXRIYXNOdWxsRmxh Zyh2LAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpVGFiLAotICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICBwSWR4LT5haUNvbHVtblswXSwKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgcElkeC0+ZGVmLT5rZXlfZGVmLT5wYXJ0c1swXS5maWVsZG5vLAogICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqcHJSaHNIYXNOdWxsKTsKICAgICAgICAgICAg ICAgICAgfQogICAgICAgICAgICAgICB9CkBAIC0zMTQ2LDEyICszMTQ2LDEzIEBAIHNxbGl0ZTNF eHByQ29kZUlOKFBhcnNlICogcFBhcnNlLCAgLyogUGFyc2luZyBhbmQgY29kZSBnZW5lcmF0aW5n IGNvbnRleHQgKi8KICAgICAgc3RydWN0IEluZGV4ICpwayA9IHNxbGl0ZTNQcmltYXJ5S2V5SW5k ZXgodGFiKTsKICAgICAgYXNzZXJ0KHBrKTsKIAorICAgICB1aW50MzJfdCBmaWVsZG5vID0gcGst PmRlZi0+a2V5X2RlZi0+cGFydHNbMF0uZmllbGRubzsKICAgICAgZW51bSBhZmZpbml0eV90eXBl IGFmZmluaXR5ID0KLSAgICAgICAgdGFiLT5kZWYtPmZpZWxkc1tway0+YWlDb2x1bW5bMF1dLmFm ZmluaXR5OwotICAgICBpZiAocGstPm5Db2x1bW4gPT0gMQorICAgICAgICB0YWItPmRlZi0+Zmll bGRzW2ZpZWxkbm9dLmFmZmluaXR5OworICAgICBpZiAocGstPmRlZi0+a2V5X2RlZi0+cGFydF9j b3VudCA9PSAxCiAgICAgICAgICAmJiBhZmZpbml0eSA9PSBBRkZJTklUWV9JTlRFR0VSCi0gICAg ICAgICAmJiBway0+YWlDb2x1bW5bMF0gPCBuVmVjdG9yKSB7Ci0gICAgICAgIGludCByZWdfcGsg PSByTGhzICsgcGstPmFpQ29sdW1uWzBdOworICAgICAgICAgJiYgKGludCkgZmllbGRubyA8IG5W ZWN0b3IpIHsKKyAgICAgICAgaW50IHJlZ19wayA9IHJMaHMgKyAoaW50KWZpZWxkbm87CiAgICAg ICAgIHNxbGl0ZTNWZGJlQWRkT3AyKHYsIE9QX011c3RCZUludCwgcmVnX3BrLCBkZXN0SWZGYWxz ZSk7CiAgICAgIH0KICAgfQpAQCAtMzQ4MywxNyArMzQ4NCw5IEBAIHNxbGl0ZTNFeHByQ29kZUxv YWRJbmRleENvbHVtbihQYXJzZSAqIHBQYXJzZSwgIC8qIFRoZSBwYXJzaW5nIGNvbnRleHQgKi8K ICAgICAgICAgICAgICAgIGludCByZWdPdXQgIC8qIFN0b3JlIHRoZSBpbmRleCBjb2x1bW4gdmFs dWUgaW4gdGhpcyByZWdpc3RlciAqLwogICAgICkKIHsKLSAgaTE2IGlUYWJDb2wgPSBwSWR4LT5h aUNvbHVtbltpSWR4Q29sXTsKLSAgaWYgKGlUYWJDb2wgPT0gWE5fRVhQUikgewotICAgICBhc3Nl cnQocElkeC0+YUNvbEV4cHIpOwotICAgICBhc3NlcnQocElkeC0+YUNvbEV4cHItPm5FeHByID4g aUlkeENvbCk7Ci0gICAgIHBQYXJzZS0+aVNlbGZUYWIgPSBpVGFiQ3VyOwotICAgICBzcWxpdGUz RXhwckNvZGVDb3B5KHBQYXJzZSwgcElkeC0+YUNvbEV4cHItPm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ICAg ICBpZiAobklkeENvbCA9PSBuQ29sICYmIHBJZHgtPmRlZi0+b3B0cy5pc191bmlxdWUKICAgICAg ICAgICYmIHBJZHgtPnBQYXJ0SWR4V2hlcmUgPT0gMCkgewogICAgICAgICAvKiBwSWR4IGlzIGEg VU5JUVVFIGluZGV4IChvciBhIFBSSU1BUlkgS0VZKSBhbmQgaGFzIHRoZSByaWdodCBudW1iZXIK ICAgICAgICAgICogb2YgY29sdW1ucy4gSWYgZWFjaCBpbmRleGVkIGNvbHVtbiBjb3JyZXNwb25k cyB0byBhIGZvcmVpZ24ga2V5CkBAIC0yODcsNyArMjg3LDggQEAgc3FsaXRlM0ZrTG9jYXRlSW5k ZXgoUGFyc2UgKiBwUGFyc2UsICAgLyogUGFyc2UgY29udGV4dCB0byBzdG9yZSBhbnkgZXJyb3Ig aW4gKi8KICAgICAgICAgICAgICovCiAgICAgICAgICAgIGludCBpLCBqOwogICAgICAgICAgICBm b3IgKGkgPSAwOyBpIDwgbkNvbDsgaSsrKSB7Ci0gICAgICAgICAgICAgIGkxNiBpQ29sID0gcElk eC0+YWlDb2x1bW5baV07ICAvKiBJbmRleCBvZiBjb2x1bW4gaW4gcGFyZW50IHRibCAqLworICAg ICAgICAgICAgICBpMTYgaUNvbCA9IChpbnQpIHBJZHgtPmRlZi0+a2V5X2RlZi0+cGFydHNbaV0u ZmllbGRubzsgLyogSW5kZXggb2YgY29sdW1uIGluIHBhcmVudCB0YmwgKi8KKwogICAgICAgICAg ICAgICBjaGFyICp6SWR4Q29sOyAvKiBOYW1lIG9mIGluZGV4ZWQgY29sdW1uICovCiAKICAgICAg ICAgICAgICAgaWYgKGlDb2wgPCAwKQpAQCAtMzAzLDggKzMwNCw3IEBAIHNxbGl0ZTNGa0xvY2F0 ZUluZGV4KFBhcnNlICogcFBhcnNlLCAgIC8qIFBhcnNlIGNvbnRleHQgdG8gc3RvcmUgYW55IGVy cm9yIGluICovCiAgICAgICAgICAgICAgICAgICAgICAgICAgIGlDb2wsCiAgICAgICAgICAgICAg ICAgICAgICAgICAgICZpZCk7CiAgICAgICAgICAgICAgIHN0cnVjdCBjb2xsICpjb2xsID0KLSAg ICAgICAgICAgICAgICAgc3FsX2luZGV4X2NvbGxhdGlvbihwSWR4LCBpLAotICAgICAgICAgICAg ICAgICAgICAgICAgICAgJmlkKTsKKyAgICAgICAgICAgICAgICAgcElkeC0+ZGVmLT5rZXlfZGVm LT5wYXJ0c1tpXS5jb2xsOwogICAgICAgICAgICAgICBpZiAoZGVmX2NvbGwgIT0gY29sbCkKICAg ICAgICAgICAgICAgICAgYnJlYWs7CiAKQEAgLTQ2NCwxMyArNDY0LDE0IEBAIGZrTG9va3VwUGFy ZW50KFBhcnNlICogcFBhcnNlLCAgIC8qIFBhcnNlIGNvbnRleHQgKi8KICAgICAgICAgICAgZm9y IChpID0gMDsgaSA8IG5Db2w7IGkrKykgewogICAgICAgICAgICAgICBpbnQgaUNoaWxkID0gYWlD b2xbaV0gKyAxICsgcmVnRGF0YTsKICAgICAgICAgICAgICAgaW50IGlQYXJlbnQgPQotICAgICAg ICAgICAgICAgICAgcElkeC0+YWlDb2x1bW5baV0gKyAxICsgcmVnRGF0YTsKLSAgICAgICAgICAg ICAgYXNzZXJ0KHBJZHgtPmFpQ29sdW1uW2ldID49IDApOworICAgICAgICAgICAgICAgICAoaW50 KSBwSWR4LT5kZWYtPmtleV9kZWYtPnBhcnRzW2ldLmZpZWxkbm8KKyAgICAgICAgICAgICAgICAg KyAxICsgcmVnRGF0YTsKICAgICAgICAgICAgICAgYXNzZXJ0KGFpQ29sW2ldICE9IHBUYWItPmlQ S2V5KTsKLSAgICAgICAgICAgICAgaWYgKHBJZHgtPmFpQ29sdW1uW2ldID09IHBUYWItPmlQS2V5 KSB7CisgICAgICAgICAgICAgIGlmICgoaW50KXBJZHgtPmRlZi0+a2V5X2RlZi0+CisgICAgICAg ICAgICAgICAgIHBhcnRzW2ldLmZpZWxkbm8gPT0gcFRhYi0+aVBLZXkpCiAgICAg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0+ZGVmLApAQCAt OTkyLDcgKzk5Miw2IEBAIHNxbGl0ZTNGa0NoZWNrKFBhcnNlICogcFBhcnNlLCAvKiBQYXJzZSBj b250ZXh0ICovCiAgICAgICAgIGlmIChhaUNvbFtpXSA9PSBwVGFiLT5pUEtleSkgewogICAgICAg ICAgICBhaUNvbFtpXSA9IC0xOwogICAgICAgICB9Ci0gICAgICAgIGFzc2VydChwSWR4ID09IDAg fHwgcElkeC0+YWlDb2x1bW5baV0gPj0gMCk7CiAgICAgIH0KIAogICAgICBwUGFyc2UtPm5UYWIr KzsKQEAgLTExMjYsMTAgKzExMjUsOSBAQCBzcWxpdGUzRmtPbGRtYXNrKFBhcnNlICogcFBhcnNl LCAgICAvKiBQYXJzZSBjb250ZXh0ICovCiAgICAgICAgIEluZGV4ICpwSWR4ID0gMDsKICAgICAg ICAgc3FsaXRlM0ZrTG9jYXRlSW5kZXgocFBhcnNlLCBwVGFiLCBwLCAmcElkeCwgMCk7CiAgICAg ICAgIGlmIChwSWR4KSB7Ci0gICAgICAgICAgIGludCBuSWR4Q29sID0gaW5kZXhfY29sdW1uX2Nv dW50KHBJZHgpOworICAgICAgICAgICBpbnQgbklkeENvbCA9IHBJZHgtPmRlZi0+a2V5X2RlZi0+ cGFydF9jb3VudDsKICAgICAgICAgICAgZm9yIChpID0gMDsgaSA8IG5JZHhDb2w7IGkrKykgewot ICAgICAgICAgICAgICBhc3NlcnQocElkeC0+YWlDb2x1bW5baV0gPj0gMCk7Ci0gICAgICAgICAg ICAgIG1hc2sgfD0gQ09MVU1OX01BU0socElkeC0+YWlDb2x1bW5baV0pOworICAgICAgICAgICAg ICBtYXNrIHw9IENPTFVNTl9NQVNLKHBJZHgtPmRlZi0+a2V5X2RlZi0+cGFydHNbaV0uZmllbGRu byk7CiAgICAgICAgICAgIH0KICAgICAgICAgfQogICAgICB9CkBAIC0xMjY0LDExICsxMjYyLDEw IEBAIGZrQWN0aW9uVHJpZ2dlcihQYXJzZSAqIHBQYXJzZSwgICAgLyogUGFyc2UgY29udGV4dCAq LwogICAgICAgICAgICAgICAgfHwgKHBUYWItPmlQS2V5ID49IDAKICAgICAgICAgICAgICAgJiYg cFRhYi0+aVBLZXkgPAogICAgICAgICAgICAgICAgICAoaW50KXBUYWItPmRlZi0+ZmllbGRfY291 bnQpKTsKLSAgICAgICAgYXNzZXJ0KHBJZHggPT0gMCB8fCBwSWR4LT5haUNvbHVtbltpXSA+PSAw KTsKICAgICAgICAgc3FsaXRlM1Rva2VuSW5pdCgmdFRvQ29sLAogICAgICAgICAgICAgICAgcFRh Yi0+ZGVmLT5maWVsZHNbcElkeCA/IHBJZHgtPgotICAgICAgICAgICAgICAgICAgICAgYWlDb2x1 bW5baV0gOiBwVGFiLT5pUEtleV0uCi0gICAgICAgICAgICAgICBuYW1lKTsKKyAgICAgICAgICAg ICAgICAgIGRlZi0+a2V5X2RlZi0+cGFydHNbaV0uZmllbGRubworICAgICAgICAgICAgICAgICA6 IHBUYWItPmlQS2V5XS5uYW1lKTsKICAgICAgICAgc3FsaXRlM1Rva2VuSW5pdCgmdEZyb21Db2ws CiAgICAgICAgICAgICAgICBwRktleS0+cEZyb20tPmRlZi0+ZmllbGRzWwogICAgICAgICAgICAg ICAgICBpRnJvbUNvbF0ubmFtZSk7CmRpZmYgLS1naXQgYS9zcmMvYm94L3NxbC9pbnNlcnQuYyBi L3NyYy9ib3gvc3FsL2luc2VydC5jCmluZGV4IDU5YzYxYzcwMy4uMDliZGE4NDNiIDEwMDY0NAot LS0gYS9zcmMvYm94L3NxbC9pbnNlcnQuYworKysgYi9zcmMvYm94L3NxbC9pbnNlcnQuYwpAQCAt ODksNyArODksNyBAQCBzcWxpdGUzSW5kZXhBZmZpbml0eVN0cihzcWxpdGUzICogZGIsIEluZGV4 ICogcElkeCkKICAgICAgICogdXAuCiAgICAgICAqLwogICAgICBpbnQgbjsKLSAgICAgaW50IG5D b2x1bW4gPSBpbmRleF9jb2x1bW5fY291bnQocElkeCk7CisgICAgIGludCBuQ29sdW1uID0gcElk eC0+ZGVmLT5rZXlfZGVmLT5wYXJ0X2NvdW50OwogICAgICBwSWR4LT56Q29sQWZmID0KICAgICAg ICAgIChjaGFyICopc3FsaXRlM0RiTWFsbG9jUmF3KDAsIG5Db2x1bW4gKyAxKTsKICAgICAgaWYg KCFwSWR4LT56Q29sQWZmKSB7CkBAIC05NywyMiArOTcsOCBAQCBzcWxpdGUzSW5kZXhBZmZpbml0 eVN0cihzcWxpdGUzICogZGIsIEluZGV4ICogcElkeCkKICAgICAgICAgcmV0dXJuIDA7CiAgICAg IH0KICAgICAgZm9yIChuID0gMDsgbiA8IG5Db2x1bW47IG4rKykgewotICAgICAgICBpMTYgeCA9 IHBJZHgtPmFpQ29sdW1uW25dOwotICAgICAgICBpZiAoeCA+PSAwKSB7Ci0gICAgICAgICAgIGNo YXIgYWZmaW5pdHkgPSBwSWR4LT5wVGFibGUtPgotICAgICAgICAgICAgICBkZWYtPmZpZWxkc1t4 XS5hZmZpbml0eTsKLSAgICAgICAgICAgcElkeC0+ekNvbEFmZltuXSA9IGFmZmluaXR5OwotICAg ICAgICB9IGVsc2UgewotICAgICAgICAgICBjaGFyIGFmZjsKLSAgICAgICAgICAgYXNzZXJ0KHgg PT0gWE5fRVhQUik7Ci0gICAgICAgICAgIGFzc2VydChwSWR4LT5hQ29sRXhwciAhPSAwKTsKLSAg ICAgICAgICAgYWZmID0KLSAgICAgICAgICAgICAgIHNxbGl0ZTNFeHByQWZmaW5pdHkocElkeC0+ YUNvbEV4cHItPmFbbl0uCi0gICAgICAgICAgICAgICAgICAgIHBFeHByKTsKLSAgICAgICAgICAg aWYgKGFmZiA9PSAwKQotICAgICAgICAgICAgICBhZmYgPSBBRkZJTklUWV9CTE9COwotICAgICAg ICAgICBwSWR4LT56Q29sQWZmW25dID0gYWZmOwotICAgICAgICB9CisgICAgICAgIGkxNiB4ID0g cElkeC0+ZGVmLT5rZXlfZGVmLT5wYXJ0c1tuXS5maWVsZG5vOworICAgICAgICB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YXJzZSAqIHBQYXJzZSwgICAgICAgLyogVGhlIHBhcnNlciBjb250ZXh0ICovCiAg ICAgICAqIHRoZSBpbnNlcnQgb3IgdXBkYXRlLiAgU3RvcmUgdGhhdCByZWNvcmQgaW4gdGhlIGFS ZWdJZHhbaXhdIHJlZ2lzdGVyCiAgICAgICAqLwogICAgICByZWdJZHggPSBhUmVnSWR4W2l4XSAr IDE7Ci0gICAgIGludCBuSWR4Q29sID0gKGludClpbmRleF9jb2x1bW5fY291bnQocElkeCk7Cisg ICAgIGludCBuSWR4Q29sID0gcElkeC0+ZGVmLT5rZXlfZGVmLT5wYXJ0X2NvdW50OwogICAgICBm b3IgKGkgPSAwOyBpIDwgbklkeENvbDsgaSsrKSB7Ci0gICAgICAgIGludCBpRmllbGQgPSBwSWR4 LT5haUNvbHVtbltpXTsKKyAgICAgICAgaW50IGlGaWVsZCA9IChpbnQpIHBJZHgtPmRlZi0+a2V5 X2RlZi0+cGFydHNbaV0uZmllbGRubzsKICAgICAgICAgaW50IHg7Ci0gICAgICAgIGlmIChpRmll bGQgPT0gWE5fRVhQUikgewotICAgICAgICAgICBwUGFyc2UtPmNrQmFzZSA9IHJlZ05ld0RhdGEg KyAxOwotICAgICAgICAgICBzcWxpdGUzRXhwckNvZGVDb3B5KHBQYXJzZSwKLSAgICAgICAgICAg ICAgICAgICAgIHBJZHgtPmFDb2xFeHByLT5hW2ldLnBFeHByLAotICAgICAgICAgICAgICAgICAg ICAgcmVnSWR4ICsgaSk7Ci0gICAgICAgICAgIHBQYXJzZS0+Y2tCYXNlID0gMDsKLSAgICAgICAg ICAgVmRiZUNvbW1lbnQoKHYsICIlcyBjb2x1bW4gJWQiLCBwSWR4LT56TmFtZSwKLSAgICAgICAg ICAgICAgICAgICBpKSk7Ci0gICAgICAgIH0gZWxzZSB7Ci0gICAgICAgICAgIC8qIE9QX1NDb3B5 IGNvcGllcyB2YWx1ZSBpbiBzZXBhcmF0ZSByZWdpc3RlciwKLSAgICAgICAgICAgICogd2hpY2gg bGF0ZXIgd2lsbCBiZSB1c2VkIGJ5IE9QX05vQ29uZmxpY3QuCi0gICAgICAgICAgICAqIEJ1dCBP UF9Ob0NvbmZsaWN0IGlzIG5lY2Vzc2FyeSBvbmx5IGluIGNhc2VzCi0gICAgICAgICAgICAqIHdo ZW4gYnl0ZWNvZGUgaXMgbmVlZGVkIGZvciBwcm9wZXIgVU5JUVVFCi0gICAgICAgICAgICAqIGNv bnN0cmFpbnQgaGFuZGxpbmcuCi0gICAgICAgICAgICAqLwotICAgICAgICAgICBpZiAodW5pcXVl Qnl0ZUNvZGVOZWVkZWQpIHsKLSAgICAgICAgICAgICAgaWYgKGlGaWVsZCA9PSBwVGFiLT5pUEtl eSkKLSAgICAgICAgICAgICAgICAgeCA9IHJlZ05ld0RhdGE7Ci0gICAgICAgICAgICAgIGVsc2UK LSAgICAgICAgICAgICAgICAgeCA9IGlGaWVsZCArIHJlZ05ld0RhdGEgKyAxOwotCi0gICAgICAg ICAgICAgIGFzc2VydChpRmllbGQgPj0gMCk7Ci0gICAgICAgICAgICAgIHNxbGl0ZTNWZGJlQWRk T3AyKHYsIE9QX1NDb3B5LAotICAgICAgICAgICAgICAgICAgICAgIHgsIHJlZ0lkeCArIGkpOwot ICAgICAgICAgICAgICBWZGJlQ29tbWVudCgodiwgIiVzIiwKLSAgICAgICAgICAgICAgICAgICAg ICBwVGFiLT5kZWYtPmZpZWxkc1sKLSAgICAgICAgICAgICAgICAgICAgaUZpZWxkXS5uYW1lKSk7 Ci0gICAgICAgICAgIH0KKyAgICAgICAgLyogT1BfU0NvcHkgY29waWVzIHZhbHVlIGluIHNlcGFy YXRlIHJlZ2lzdGVyLAorICAgICAgICAgKiB3aGljaCBsYXRlciB3aWxsIGJlIHVzZWQgYnkgT1Bf Tm9Db25mbGljdC4KKyAgICAgICAgICogQnV0IE9QX05vQ29uZmxpY3QgaXMgbmVjZXNzYXJ5IG9u bHkgaW4gY2FzZXMKKyAgICAgICAgICogd2hlbiBieXRlY29kZSBpcyBuZWVkZWQgZm9yIHByb3Bl ciBVTklRVUUKKyAgICAgICAgICogY29uc3RyYWludCBoYW5kbGluZy4KKyAgICAgICAgICovCisg ICAgICAgIGlmICh1bmlxdWVCeXRlQ29kZU5lZWRlZCkgeworICAgICAgICAgICBpZiAoaUZpZWxk ID09IHBUYWItPmlQS2V5KQorICAgICAgICAgICAgICB4ID0gcmVnTmV3RGF0YTsKKyAgICAgICAg ICAgZWxzZQorICAgICAgICAgICAgICB4ID0gaUZpZWxkICsgcmVnTmV3RGF0YSArIDE7CisKKyAg ICAgICAgICAgYXNzZXJ0KGlGaWVsZCA+PSAwKTsKKyAgICAgICAgICAgc3FsaXRlM1ZkYmVBZGRP cDIodiwgT1BfU0NvcHksCisgICAgICAgICAgICAgICAgICAgeCwgcmVnSWR4ICsgaSk7CisgICAg ICAgICAgIFZkYmVDb21tZW50KCh2LCAiJXMiLAorICAgICAgICAgICAgICAgICAgIHBUYWItPmRl Zi0+ZmllbGRzW2lGaWVsZF0ubmFtZSkpOwogICAgICAgICB9CiAgICAgIH0KIApAQCAtMTI5Myw4 ICsxMjY4LDEyIEBAIHNxbGl0ZTNHZW5lcmF0ZUNvbnN0cmFpbnRDaGVja3MoUGFyc2UgKiBwUGFy c2UsICAgIC8qIFRoZSBwYXJzZXIgY29udGV4dCAqLwogICAgICAgICAvKiBJZiBQSyBpcyBtYXJr ZWQgYXMgSU5URUdFUiwgdXNlIGl0IGFzIHN0cmljdCB0eXBlLAogICAgICAgICAgKiBub3QgYXMg YWZmaW5pdHkuIEVtaXQgY29kZSBmb3IgdHlwZSBjaGVja2luZyAqLwogICAgICAgICBpZiAobklk eENvbCA9PSAxKSB7Ci0gICAgICAgICAgIHJlZ19wayA9IHJlZ05ld0RhdGEgKyAxICsgcElkeC0+ YWlDb2x1bW5bMF07Ci0gICAgICAgICAgIGlmIChwVGFiLT56Q29sQWZmW3BJZHgtPmFpQ29sdW1u WzBdXSA9PQorICAgICAgICAgICByZWdfcGs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IFRoZSBwYXJzZXIgY29udGV4dCAqLwogICAgICBpZiAodW5pcXVlQnl0ZUNvZGVOZWVkZWQp IHsKICAgICAgICAgc3FsaXRlM1ZkYmVBZGRPcDRJbnQodiwgT1BfTm9Db25mbGljdCwgaVRoaXND dXIsCiAgICAgICAgICAgICAgICAgICAgYWRkclVuaXF1ZU9rLCByZWdJZHgsCi0gICAgICAgICAg ICAgICAgICAgaW5kZXhfY29sdW1uX2NvdW50KHBJZHgpKTsKKyAgICAgICAgICAgICAgICAgICBw SWR4LT5kZWYtPmtleV9kZWYtPnBhcnRfY291bnQpOwogICAgICB9CiAgICAgIFZkYmVDb3ZlcmFn ZSh2KTsKIApAQCAtMTQxMCwxOSArMTM4OSwxOCBAQCBzcWxpdGUzR2VuZXJhdGVDb25zdHJhaW50 Q2hlY2tzKFBhcnNlICogcFBhcnNlLCAgICAgICAvKiBUaGUgcGFyc2VyIGNvbnRleHQgKi8KICAg ICAgICAgICAgICAgICAgICAgICAgIG5Qa0ZpZWxkKTsKICAgICAgaWYgKGlzVXBkYXRlIHx8IG9u X2Vycm9yID09IE9OX0NPTkZMSUNUX0FDVElPTl9SRVBMQUNFKSB7CiAgICAgICAgIGludCB4Owot ICAgICAgICBpbnQgblBrQ29sID0gaW5kZXhfY29sdW1uX2NvdW50KHBQayk7CisgICAgICAgIGlu dCBuUGtDb2wgPSBwUGstPmRlZi0+a2V5X2RlZi0+cGFydF9jb3VudDsKICAgICAgICAgLyogRXh0 cmFjdCB0aGUgUFJJTUFSWSBLRVkgZnJvbSB0aGUgZW5kIG9mIHRoZSBpbmRleCBlbnRyeSBhbmQK ICAgICAgICAgICogc3RvcmUgaXQgaW4gcmVnaXN0ZXJzIHJlZ1IuLnJlZ1IrblBrLTEKICAgICAg ICAgICovCiAgICAgICAgIGlmIChwSWR4ICE9IHBQaykgewogICAgICAgICAgICBmb3IgKGkgPSAw OyBpIDwgblBrQ29sOyBpKyspIHsKLSAgICAgICAgICAgICAgYXNzZXJ0KHBQay0+YWlDb2x1bW5b aV0gPj0gMCk7Ci0gICAgICAgICAgICAgIHggPSBwUGstPmFpQ29sdW1uW2ldOworICAgICAgICAg ICAgICB4ID0gcFBrLT5kZWYtPmtleV9kZWYtPnBhcnRzW2ldLmZpZWxkbm87CiAgICAgICAgICAg ICAgIHNxbGl0ZTNWZGJlQWRkT3AzKHYsIE9QX0NvbHVtbiwKICAgICAgICAgICAgICAgICAgICAg ICBpVGhpc0N1ciwgeCwgcmVnUiArIGkpOwogICAgICAgICAgICAgICBWZGJlQ29tbWVudCgodiwg IiVzLiVzIiwgcFRhYi0+ZGVmLT5uYW1lLAogICAgICAgICAgICAgICAgICBwVGFiLT5kZWYtPmZp ZWxkc1sKLSAgICAgICAgICAgICAgICAgICAgcFBrLT5haUNvbHVtbltpXV0ubmFtZSkpOworICAg ICAgICAgICAgICAgICAgICB4XS5uYW1lKSk7CiAgICAgICAgICAgIH0KICAgICAgICAgfQogICAg ICAgICBpZiAoaXNVcGRhdGUgJiYgdW5pcXVlQnl0ZUNvZGVOZWVkZWQpIHsKQEAgLTE0NDAsMTAg KzE0MTgsMTEgQEAgc3FsaXRlM0dlbmVyYXRlQ29uc3RyYWludENoZWNrcyhQYXJzZSAqIHBQYXJz ZSwgICAgICAgLyogVGhlIHBhcnNlciBjb250ZXh0ICovCiAgICAgICAgICAgICAgICAgICAgIHJl Z0lkeCA6IHJlZ1IpOwogCiAgICAgICAgICAgIGZvciAoaSA9IDA7IGkgPCBuUGtDb2w7IGkrKykg ewotICAgICAgICAgICAgICB1aW50MzJfdCBpZDsKLSAgICAgICAgICAgICAgY2hhciAqcDQgPSAo Y2hhciAqKXNxbF9pbmRleF9jb2xsYXRpb24ocFBrLCBpLCAmaWQpOwotICAgICAgICAgICAgICB4 ID0gcFBrLT5haUNvbHVtbltpXTsKLSAgICAgICAgICAgICAgYXNzZXJ0KHggPj0gMCk7CisgICAg ICAgICAgICAgIGNoYXIgKnA0ID0gKGNoYXIgKikgcFBrLT5kZWYtPmtleV9kZWYtPnBhcnRzW2ld LmNvbGw7CisgICAgICAgICAgICAgIHggPSBwUGstPmRlZi0+a2V5X2RlZi0+cGFydHNbaV0uZmll bGRubzsKKyAgICAgICAgICAgICAgaWYgKHBQay0+dG51bT09MCkgeworICAgICAgICAgICAgICAg ICB4ID0gLTE7CisgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgaWYgKGkgPT0gKG5Qa0Nv bCAtIDEpKSB7CiAgICAgICAgICAgICAgICAgIGFkZHJKdW1wID0gYWRkclVuaXF1ZU9rOwogICAg ICAgICAgICAgICAgICBvcCA9IE9QX0VxOwpAQCAtMTYyMCw4ICsxNTk5LDggQEAgc3FsaXRlM09w ZW5UYWJsZUFuZEluZGljZXMoUGFyc2UgKiBwUGFyc2UsICAgLyogUGFyc2luZyBjb250ZXh0ICov CiAgICAgICAgICBJc1ByaW1hcnlLZXlJbmRleChwSWR4KSB8fCAgICAvKiBDb25kaXRpb24gMiAq LwogICAgICAgICAgc3FsaXRlM0ZrUmVmZXJlbmNlcyhwVGFiKSB8fCAgIC8qIENvbmRpdGlvbiAz ICovCiAgICAgICAgICAvKiBDb25kaXRpb24gNCAqLwotICAgICAgICAgKGluZGV4X2lzX3VuaXF1 ZShwSWR4KSAmJiBwSWR4LT5vbkVycm9yICE9Ci0gICAgICAgICAgT05fQ09ORkxJQ1RfQUNUSU9O X0RFRkFVTFQgJiYKKyAgICAgICAgIChwSWR4LT5kZWYtPm9wdHMuaXNfdW5pcXVlICYmIHBJZHgt Pm9uRXJyb3IgIT0KKyAgICAgICAgICAgICAgICAgICBPTl9DT05GTElDVF9BQ1RJT05fREVGQVVM VCAmJgogICAgICAgICAgIC8qIENvbmRpdGlvbiA0LjEgKi8KICAgICAgICAgICBwSWR4LT5vbkVy cm9yICE9IE9OX0NPTkZMSUNUX0FDVElPTl9BQk9SVCkgfHwKICAgICAgICAgICAvKiBDb25kaXRp b24gNC4yICovCkBAIC0xNjM5LDcgKzE2MTgsNyBAQCBzcWx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luZGV4ICogcFNyYykKICAgICAgcmV0dXJuIDA7ICAvKiBEaWZmZXJlbnQgY29uZmxpY3Qg cmVzb2x1dGlvbiBzdHJhdGVnaWVzICovCiAgIH0KICAgZm9yIChpID0gMDsgaSA8IG5TcmNDb2w7 IGkrKykgewotICAgICBpZiAocFNyYy0+YWlDb2x1bW5baV0gIT0gcERlc3QtPmFpQ29sdW1uW2ld KSB7CisKKyAgICAgaWYgKHBTcmMtPmRlZi0+a2V5X2RlZi0+cGFydHNbaV0uZmllbGRubyAhPQor ICAgICAgICAgcERlc3QtPmRlZi0+a2V5X2RlZi0+cGFydHNbaV0uZmllbGRubykgewogICAgICAg ICByZXR1cm4gMDsgIC8qIERpZmZlcmVudCBjb2x1bW5zIGluZGV4ZWQgKi8KICAgICAgfQotICAg ICBpZiAocFNyYy0+YWlDb2x1bW5baV0gPT0gWE5fRVhQUikgewotICAgICAgICBhc3NlcnQocFNy Yy0+YUNvbEV4cHIgIT0gMCAmJiBwRGVzdC0+YUNvbEV4cHIgIT0gMCk7Ci0gICAgICAgIGlmIChz cWxpdGUzRXhwckNvbXBhcmUocFNyYy0+YUNvbEV4cHItPmFbaV0ucEV4cHIsCi0gICAgICAgICAg ICAgICAgICAgICBwRGVzdC0+YUNvbEV4cHItPmFbaV0ucEV4cHIsCi0gICAgICAgICAgICAgICAg ICAgICAtMSkgIT0gMCkgewotICAgICAgICAgICByZXR1cm4gMDsgIC8qIERpZmZlcmVudCBleHBy ZXNzaW9ucyBpbiB0aGUgaW5kZXggKi8KLSAgICAgICAgfQotICAgICB9CiAgICAgIGlmIChzcWxf aW5kZXhfY29sdW1uX3NvcnRfb3JkZXIocFNyYywgaSkgIT0KICAgICAgICAgIHNxbF9pbmRleF9j b2x1bW5fc29ydF9vcmRlcihwRGVzdCwgaSkpIHsKICAgICAgICAgcmV0dXJuIDA7ICAvKiBEaWZm ZXJlbnQgc29ydCBvcmRlcnMgKi8KICAgICAgfQotICAgICB1aW50MzJfdCBpZDsKLSAg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GVmLT5maWVsZF9jb3VudAotICAgICAgICAg ICAgICAgICAgICAgICYmIHBQay0+YWlDb2x1bW5bayAtIDFdICE9CisgICAgICAgICAgICAgICAg ICAgICAgJiYgKGludCkgcFBrLT5kZWYtPmtleV9kZWYtPnBhcnRzW2sgLSAxXS5maWVsZG5vICE9 CiAgICAgICAgICAgICAgICAgICAgICAgaTsgaysrKSB7CiAgICAgICAgICAgICAgICAgIH0KICAg ICAgICAgICAgICAgfQpAQCAtNDMwLDcgKzQzMCw3IEBAIHNxbGl0ZTNQcmFnbWEoUGFyc2UgKiBw UGFyc2UsIFRva2VuICogcElkLCAvKiBGaXJzdCBwYXJ0IG9mIFtzY2hlbWEuXWlkIGZpZWxkICov CiAgICAgICAgICAgICAgIHNpemVfdCBhdmdfdHVwbGVfc2l6ZV9pZHggPQogICAgICAgICAgICAg ICAgICBzcWxfaW5kZXhfdHVwbGVfc2l6ZShzcGFjZSwgaWR4KTsKICAgICAgICAgICAgICAgc3Fs aXRlM1ZkYmVNdWx0aUxvYWQodiwgMiwgInNpaSIsCi0gICAgICAgICAgICAgICAgICAgICAgICAg cElkeC0+ek5hbWUsCisgICAgICAgICAgICAgICAgICAgICAgICAgcElkeC0+ZGVmLT5uYW1lLAog ICAgICAgICAgICAgICAgICAgICAgICAgIGF2Z190dXBsZV9zaXplX2lkeCwKICAgICAgICAgICAg ICAgICAgICAgICAgICBpbmRleF9maWVsZF90dXBsZV9lc3QocElkeCwgMCkpOwogICAgICAgICAg ICAgICBzcWxpdGUzVmRiZUFkZE9wMih2LCBPUF9SZXN1bHRSb3csIDEsCkBAIC00NTksMTEgKzQ1 OSwxMSBAQCBzcWxpdGUzUHJhZ21hKFBhcnNlICogcFBhcnNlLCBUb2tlbiAqIHBJZCwgICAvKiBG aXJzdCBwYXJ0IG9mIFtzY2hlbWEuXWlkIGZpZWxkICovCiAgICAgICAgICAgICAgICAgICAqLwog ICAgICAgICAgICAgICAgICBwUGFyc2UtPm5NZW0gPSAzOwogICAgICAgICAgICAgICB9Ci0gICAg ICAgICAgICAgIG14ID0gaW5kZXhfY29sdW1uX2NvdW50KHBJZHgpOworICAgICAgICAgICAgICBt eCA9IHBJZHgtPmRlZi0+a2V5X2RlZi0+cGFydF9jb3VudDsKICAgICAgICAgICAgICAgYXNzZXJ0 KHBQYXJzZS0+bk1lbSA8PQogICAgICAgICAgICAgICAgICAgICAgcFByYWdtYS0+blByYWdDTmFt ZSk7CiAgICAgICAgICAgICAgIGZvciAoaSA9IDA7IGkgPCBteDsgaSsrKSB7Ci0gICAgICAgICAg ICAgICAgIGkxNiBjbnVtID0gcElkeC0+YWlDb2x1bW5baV07CisgICAgICAgICAgICAgICAgIGkx NiBjbnVtID0gKGludCkgcElkeC0+ZGVmLT5rZXlfZGVmLT5wYXJ0c1tpXS5maWVsZG5vOwogICAg ICAgICAgICAgICAgICBhc3NlcnQocElkeC0+cFRhYmxlKTsKICAgICAgICAgICAgICAgICAgc3Fs aXRlM1ZkYmVNdWx0aUxvYWQodiwgMSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAiaWlz IiwgaSwKQEAgLTQ3Nyw5ICs0NzcsMTAgQEAgc3FsaXRlM1ByYWdtYShQYXJzZSAqIHBQYXJzZSwg VG9rZW4gKiBwSWQsICAgIC8qIEZpcnN0IHBhcnQgb2YgW3NjaGVtYS5daWQgZmllbGQgKi8KICAg ICAgICAgICAgICAgICAgICAgICAgICAgICBuYW1lKTsKICAgICAgICAgICAgICAgICAgaWYgKHBQ cmFnbWEtPmlBcmcpIHsKICAgICAgICAgICAgICAgICAgICAgY29uc3QgY2hhciAqY19uOwotICAg ICAgICAgICAgICAgICAgICB1aW50MzJfdCBpZDsKKyAgICAgICAgICAgICAgICAgICAgdWludDMy X3QgaWQgPQorICAgICAgICAgICAgICAgICAgICAgICBwSWR4LT5kZWYtPmtleV9kZWYtPnBhcnRz W2ldLmNvbGxfaWQ7CiAgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBjb2xsICpjb2xsID0KLSAg ICAgICAgICAgICAgICAgICAgICAgc3FsX2luZGV4X2NvbGxhdGlvbihwSWR4LCBpLCAmaWQpOwor ICAgICAgICAgICAgICAgICAgICAgICBwSWR4LT5kZWYtPmtleV9kZWYtPnBhcnRzW2ldLmNvbGw7 CiAgICAgICAgICAgICAgICAgICAgIGlmIChjb2xsICE9IE5VTEwpCiAgICAgICAgICAgICAgICAg ICAgICAgIGNfbiA9IGNvbGxfYnlfaWQoaWQpLT5uYW1lOwogICAgICAgICAgICAgICAgICAgICBl bHNlCkBAIC01MTksMTAgKzUyMCw4IEBAIHNxbGl0ZTNQcmFnbWEoUGFyc2UgKiBwUGFyc2UsIFRv a2VuICogcElkLCAgICAvKiBGaXJzdCBwYXJ0IG9mIFtzY2hlbWEuXWlkIGZpZWxkICovCiAgICAg ICAgICAgICAgICAgICAgICB7ICJjIiwgInUiLCAicGsiIH07CiAgICAgICAgICAgICAgICAgIHNx bGl0ZTNWZGJlTXVsdGlMb2FkKHYsIDEsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgImlz aXNpIiwgaSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICBwSWR4LT4KLSAgICAgICAgICAg ICAgICAgICAgICAgICAgICB6TmFtZSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbmRl eF9pc191bmlxdWUKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAocElkeCksCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgcElkeC0+ZGVmLT5uYW1lLAorICAgICAgICAgICAgICAgICAg ICAgICAgICAgIHBJZHgtPmRlZi0+b3B0cy5pc191bmlxdWUsCiAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgYXpPcmlnaW4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbcElkeC0+CiAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlkeFR5cGVdLApkaWZmIC0tZ2l0IGEvc3JjL2Jv eC9zcWwvc2VsZWN0LmMgYi9zcmMvYm94L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faW5kZXhfY29sbGF0aW9uKHBJZHgsIGosICZpZCk7CisgICAgICAgIHBTY2FuLT5jb2xs ID0gcElkeC0+ZGVmLT5rZXlfZGVmLT5wYXJ0c1tqXS5jb2xsOwogICAgICAgICBwU2Nhbi0+aXNf Y29sdW1uX3NlZW4gPSB0cnVlOwogICAgICB9Ci0gIH0gZWxzZSBpZiAoaUNvbHVtbiA9PSBYTl9F WFBSKSB7Ci0gICAgIHJldHVybiAwOwogICB9CiAgIHBTY2FuLT5vcE1hc2sgPSBvcE1hc2s7CiAg IHBTY2FuLT5rID0gMDsKQEAgLTQ2NiwxNiArNDY4LDE2IEBAIGZpbmRJbmRleENvbChQYXJzZSAq IHBQYXJzZSwgLyogUGFyc2UgY29udGV4dCAqLwogewogICBmb3IgKGludCBpID0gMDsgaSA8IHBM aXN0LT5uRXhwcjsgaSsrKSB7CiAgICAgIEV4cHIgKnAgPSBzcWxpdGUzRXhwclNraXBDb2xsYXRl KHBMaXN0LT5hW2ldLnBFeHByKTsKLSAgICAgaWYgKHAtPm9wID09IFRLX0NPTFVNTiAmJgotICAg ICAgICAgcC0+aUNvbHVtbiA9PSBwSWR4LT5haUNvbHVtbltpQ29sXSAmJgotICAgICAgICAgcC0+ aVRhYmxlID09IGlCYXNlKSB7CisgICAgIGlmIChwLT5vcCA9PSBUS19DT0xVTU4gJiYgcC0+aVRh YmxlID09IGlCYXNlICYmCisgICAgICAgIHAtPmlDb2x1bW4gPT0gKGludCkgcElkeC0+ZGVmLT5r ZXlfZGVmLT4KKyAgICAgICAgcGFydHNbaUNvbF0uZmllbGRubykgewogICAgICAgICBib29sIGlz X2ZvdW5kOwogICAgICAgICB1aW50MzJfdCBpZDsKICAgICAgICAgc3RydWN0IGNvbGwgKmNvbGwg PSBzcWxfZXhwcl9jb2xsKHBQYXJzZSwKICAgICAgICAgICAgICAgICAgICAgICBwTGlzdC0+YVtp XS5wRXhwciwKICAgICAgICAgICAgICAgICAgICAgICAmaXNfZm91bmQsICZpZCk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wYXNzZWQgYXMgdGhlIHRoaXJkIGFyZ3VtZW50CiAgKiBpcyBy ZWR1bmRhbnQuCkBAIC01NTYsOSArNTM3LDkgQEAgaXNEaXN0aW5jdFJlZHVuZGFudChQYXJzZSAq IHBQYXJzZSwgICAgICAgLyogUGFyc2luZyBjb250ZXh0ICovCiAgICAqICAgICAgY29udGFpbiBh ICJjb2w9WCIgdGVybSBhcmUgc3ViamVjdCB0byBhIE5PVCBOVUxMIGNvbnN0cmFpbnQuCiAgICAq LwogICBmb3IgKHBJZHggPSBwVGFiLT5wSW5kZXg7IHBJZHg7IHBJZHggPSBwSWR4LT5wTmV4dCkg ewotICAgICBpZiAoIWluZGV4X2lzX3VuaXF1ZShwSWR4KSkKKyAgICAgaWYgKCFwSWR4LT5kZWYt Pm9wdHMuaXNfdW5pcXVlKQogICAgICAgICBjb250aW51ZTsKLSAgICAgaW50IGNvbF9jb3VudCA9 IGluZGV4X2NvbHVtbl9jb3VudChwSWR4KTsKKyAgICAgaW50IGNvbF9jb3VudCA9IHBJZHgtPmRl Zi0+a2V5X2RlZi0+cGFydF9jb3VudDsKICAgICAgZm9yIChpID0gMDsgaSA8IGNvbF9jb3VudDsg aSsrKSB7CiAgICAgICAgIGlmICgwID09CiAgICAgICAgICAgICBzcWxpdGUzV2hlcmVGaW5kVGVy bShwV0MsIGlCYXNlLCBpLCB+KEJpdG1hc2spIDAsCkBAIC01NjYsMTEgKzU0NywxMiBAQCBpc0Rp c3RpbmN0UmVkdW5kYW50KFBhcnNlICogcFBhcnNlLCAgICAgLyogUGFyc2luZyBjb250ZXh0ICov CiAgICAgICAgICAgIGlmIChmaW5kSW5kZXhDb2wKICAgICAgICAgICAgICAgIChwUGFyc2UsIHBE aXN0aW5jdCwgaUJhc2UsIHBJZHgsIGkpIDwgMCkKICAgICAgICAgICAgICAgYnJlYWs7Ci0gICAg ICAgICAgIGlmIChpbmRleENvbHVtbk5vdE51bGwocElkeCwgaSkgPT0gMCkKKyAgICAgICAgICAg dW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C8qIGlnbm9yZSBJUyBbTk9UXSBOVUxMIGNv bnN0cmFpbnRzIG9uIE5PVCBOVUxMIGNvbHVtbnMgKi8KICAgICAgfQpAQCAtMjQ0NSwxMyArMjQy NywxMyBAQCB3aGVyZUxvb3BBZGRCdHJlZUluZGV4KFdoZXJlTG9vcEJ1aWxkZXIgKiBwQnVpbGRl ciwgICAgLyogVGhlIFdoZXJlTG9vcCBmYWN0b3J5ICovCiAgICAgICAgICAgICAgICAgICAgICAq LwogICAgICAgICB9CiAgICAgIH0gZWxzZSBpZiAoZU9wICYgV09fRVEpIHsKLSAgICAgICAgaW50 IGlDb2wgPSBwUHJvYmUtPmFpQ29sdW1uW3NhdmVkX25FcV07CisgICAgICAgIGludCBpQ29sID0g cFByb2JlLT5kZWYtPmtleV9kZWYtPnBhcnRzW3NhdmVkX25FcV0uZmllbGRubzsKICAgICAgICAg cE5ldy0+d3NGbGFncyB8PSBXSEVSRV9DT0xVTU5fRVE7CiAgICAgICAgIGFzc2VydChzYXZlZF9u RXEgPT0gcE5ldy0+bkVxKTsKLSAgICAgICAgaWYgKChpQ29sID4gMCAmJiBuSW5NdWwgPT0gMAot ICAgICAgICAgICAmJiBzYXZlZF9uRXEgPT0gblByb2JlQ29sIC0gMSkKLSAgICAgICAgICAgICkg ewotICAgICAgICAgICBpZiAoaUNvbCA+PSAwICYmCisgICAgICAgIGlmICgoaUNvbCA+IDAgJiYg bkluTXVsID09IDAgJiYKKyAgICAgICAgICAgICAgc2F2ZWRfbkVxID09IG5Qcm9iZUNvbCAtIDEp CisgICAgICAgICAgICkgeworICAgICAgICAgICBpZiAocFByb2JlLT50bnVtICE9IDAgJiYKICAg ICAgICAgICAgICAgICFpbmRleF9pc191bmlxdWVfbm90X251bGwocFByb2JlKSkgewogICAgICAg ICAgICAgICBwTmV3LT53c0ZsYWdzIHw9IFdIRVJFX1VOUV9XQU5URUQ7CiAgICAgICAgICAgIH0g ZWxzZSB7CkBAIC0yNTE0LDggKzI0OTYsNyBA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QgKnBPQjsK ICAgRXhwckxpc3QgKmFDb2xFeHByOwogICBpbnQgaWksIGpqOwotICBpbnQgbklkeENvbCA9IGlu ZGV4X2NvbHVtbl9jb3VudChwSW5kZXgpOworICBpbnQgbklkeENvbCA9IHBJbmRleC0+ZGVmLT5r ZXlfZGVmLT5wYXJ0X2NvdW50OwogICBpZiAoaW5kZXhfaXNfdW5vcmRlcmVkKHBJbmRleCkpCiAg ICAgIHJldHVybiAwOwogICBpZiAoKHBPQiA9IHBCdWlsZGVyLT5wV0luZm8tPnBPcmRlckJ5KSA9 PSAwKQpAQCAtMjcyNiwxMyArMjcwNywxMiBAQCBpbmRleE1pZ2h0SGVscFdpdGhPcmRlckJ5KFdo ZXJlTG9vcEJ1aWxkZXIgKiBwQnVpbGRlciwKICAgICAgICAgaWYgKHBFeHByLT5pQ29sdW1uIDwg MCkKICAgICAgICAgICAgcmV0dXJuIDE7CiAgICAgICAgIGZvciAoamogPSAwOyBqaiA8IG5JZHhD b2w7IGpqKyspIHsKLSAgICAgICAgICAgaWYgKHBFeHByLT5pQ29sdW1uID09IHBJbmRleC0+YWlD b2x1bW5bampdKQorICAgICAgICAgICBpZiAocEV4cHItPmlDb2x1bW4gPT0gKGludCkKKyAgICAg ICAgICAgICAgIHBJbmRleC0+ZGVmLT5rZXlfZGVmLT5wYXJ0c1tqal0uZmllbGRubykKICAgICAg ICAgICAgICAgcmV0dXJuIDE7CiAgICAgICAgIH0KICAgICAgfSBlbHNlIGlmICgoYUNvbEV4cHIg PSBwSW5kZXgtPmFDb2xFeHByKSAhPSAwKSB7CiAgICAgICAgIGZvciAoamogPSAwOyBqaiA8IG5J ZHhDb2w7IGpqKyspIHsKLSAgICAgICAgICAgaWYgKHBJbmRleC0+YWlDb2x1bW5bampdICE9IFhO X0VYUFIpCi0gICAgICAgICAgICAgIGNvbnRpbnVlOwogICAgICAgICAgICBpZiAoc3FsaXRlM0V4 cHJDb21wYXJlCiAgICAgICAgICAgICAgICAocEV4cHIsIGFD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yZGVyQnkoV2hlcmVJbmZvICogcFdJbmZvLCAgICAv KiBUaGUgV0hFUkUgY2xhdXNlICovCiAgICAgICAgICAgICAgIGluZGV4X2lzX3Vub3JkZXJlZChw SW5kZXgpKSB7CiAgICAgICAgICAgIHJldHVybiAwOwogICAgICAgICB9IGVsc2UgewotICAgICAg ICAgICBuQ29sdW1uID0gaW5kZXhfY29sdW1uX2NvdW50KHBJbmRleCk7Ci0gICAgICAgICAgIGlz T3JkZXJEaXN0aW5jdCA9IGluZGV4X2lzX3VuaXF1ZShwSW5kZXgpOworICAgICAgICAgICBuQ29s dW1uID0gcEluZGV4LT5kZWYtPmtleV9kZWYtPnBhcnRfY291bnQ7CisgICAgICAgICAgIGlzT3Jk ZXJEaXN0aW5jdCA9IHBJbmRleC0+ZGVmLT5vcHRzLmlzX3VuaXF1ZTsKICAgICAgICAgfQogCiAg ICAgICAgIC8qIExvb3AgdGhyb3VnaCBhbGwgY29sdW1ucyBvZiB0aGUgaW5kZXggYW5kIGRlYWwg d2l0aCB0aGUgb25lcwpAQCAtMzM4Nyw3ICszMzgyLDcgQEAgd2hlcmVQYXRoU2F0aXNmaWVzT3Jk ZXJCeShXaGVyZUluZm8gKiBwV0luZm8sICAgIC8qIFRoZSBXSEVSRSBjbGF1c2UgKi8KICAgICAg ICAgICAgICogKHJldklkeCkgZm9yIHRoZSBqLXRoIGNvbHVtbiBvZiB0aGUgaW5kZXguCiAgICAg ICAgICAgICAqLwogICAgICAgICAgICBpZiAocEluZGV4KSB7Ci0gICAgICAgICAgICAgIGlDb2x1 bW4gPSBwSW5kZXgtPmFpQ29sdW1uW2pdOworICAgICAgICAgICAgICBpQ29sdW1uID0gcEluZGV4 LT5kZWYtPmtleV9kZWYtPnBhcnRzW2pdLmZpZWxkbm87CiAgICAgICAgICAgICAgIHJldklkeCA9 IHNxbF9pbmRleF9jb2x1bW5fc29ydF9vcmRlcihwSW5kZXgsCiAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgaik7CiAgICAgICAgICAgICAgIGlmIChpQ29sdW1uID09IHBJbmRleC0+cFRh YmxlLT5pUEtleSkKQEAgLTM0NDIsOCArMzQzNyw3IEBAIHdoZXJlUGF0aFNhdGlzZmllc09yZGVy QnkoV2hlcmVJbmZvICogcFdJbmZvLCAgICAvKiBUaGUgV0hFUkUgY2xhdXNlICovCiAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIHBPcmRlckJ5LT5hW2ldLnBFeHByLAogICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAmaXNfZm91bmQsICZpZCk7CiAgICAgICAgICAgICAgICAgIHN0cnVj dCBjb2xsICppZHhfY29sbCA9Ci0gICAgICAgICAgICAgICAgICAgIHNxbF9pbmRleF9jb2xsYXRp b24ocEluZGV4LAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaiwgJmlkKTsKKyAgICAg ICAgICAgICAgICAgICAgcEluZGV4LT5kZWYtPmtleV9kZWYtPnBhcnRzW2pdLmNvbGw7CiAgICAg ICAgICAgICAgICAgIGlmIChpc19mb3VuZCAmJgogICAgICAgICAgICAgICAgICAgICAgY29sbCAh PSBpZHhfY29sbCkKICAgICAgICAgICAgICAgICAgICAgY29udGludWU7CkBAIC00MTA1LDkgKzQw OTksOSBAQCB3aGVyZVNob3J0Q3V0KFdoZXJlTG9vcEJ1aWxkZXIgKiBwQnVpbGRlcikKICAgfSBl bHNlIHsKICAgICAgZm9yIChwSWR4ID0gcFRhYi0+cEluZGV4OyBwSWR4OyBwSWR4ID0gcElkeC0+ cE5leHQpIHsKICAgICAgICAgaW50IG9wTWFzazsKLSAgICAgICAgaW50IG5JZHhDb2wgPSBpbmRl eF9jb2x1bW5fY291bnQocElkeCk7CisgICAgICAgIGludCBuSWR4Q29sID0gcElkeC0+ZGVmLT5r ZXlfZGVmLT5wYXJ0X2NvdW50OwogICAgICAgICBhc3NlcnQocExvb3AtPmFMVGVybVNwYWNlID09 IHBMb29wLT5hTFRlcm0pOwotICAgICAgICBpZiAoIWluZGV4X2lzX3VuaXF1ZShwSWR4KQorICAg ICAgICBpZiAoIXBJZHgtPmRlZi0+b3B0cy5pc191bmlxdWUKICAgICAgICAgICAgIHx8IHBJZHgt PnBQYXJ0SWR4V2hlcmUgIT0gMAogICAgICAgICAgICAgfHwgbklkeENvbCA+IEFycmF5U2l6ZShw TG9vcC0+YUxUZXJtU3BhY2UpCiAgICAgICAgICAgICApCkBAIC00NjUwLDcgKzQ2NDQsNyBAQCBz cWxpdGUzV2hlcmVCZWdpbihQYXJzZSAqIHBQYXJzZSwgICAgLyogVGhlIHBhcnNlciBjb250ZXh0 ICovCiAgICAgICAgICAgICAgIHdjdHJsRmxhZ3MgJiBXSEVSRV9PUkRFUkJZX01JTikgPT0gMCkg ewogICAgICAgICAgICAgICBzcWxpdGUzVmRiZUNoYW5nZVA1KHYsIE9QRkxBR19TRUVLRVEpOyAv KiBIaW50IHRvIENPTURCMiAqLwogICAgICAgICAgICB9Ci0gICAgICAgICAgIFZkYmVDb21tZW50 KCh2LCAiJXMiLCBwSXgtPnpOYW1lKSk7CisgICAgICAgICAgIFZkYmVDb21tZW50KCh2LCAiJXMi LCBwSXgtPmRlZi0+bmFtZSkpOwogI2lmZGVmIFNRTElURV9FTkFCTEVfQ09MVU1OX1VTRURfTUFT SwogICAgICAgICAgICB7CiAgICAgICAgICAgICAgIHU2NCBjb2xVc2VkID0gMDsKQEAgLTQ3ODEs NyArNDc3NSw3IEBAIHNxbGl0ZTNXaGVyZUVuZChXaGVyZUluZm8gKiBwV0luZm8pCiAgICAgIGlm IChwTGV2ZWwtPmFkZHJTa2lwKSB7CiAgICAgICAgIHNxbGl0ZTNWZGJlR290byh2LCBwTGV2ZWwt PmFkZHJTa2lwKTsKICAgICAgICAgVmRiZUNvbW1lbnQoKHYsICJuZXh0IHNraXAtc2NhbiBvbiAl cyIsCi0gICAgICAgICAgICAgICAgcExvb3AtPnBJbmRleC0+ek5hbWUpKTsKKyAgICAgICAgICAg ICAgICBwTG9vcC0+cE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29sdW1uLCBpSWR4Q3VyLAotICAgICAgICAg ICAgICAgIHBJZHgtPmFpQ29sdW1uW2pdLCByZWdCYXNlICsgaik7Ci0gICAgICAgIHRlc3RjYXNl KHBJZHgtPmFpQ29sdW1uW2pdID09IFhOX0VYUFIpOworICAgICAgICAgICAgICAgIHBJZHgtPmRl Zi0+a2V5X2RlZi0+cGFydHNbal0uZmllbGRubywgcmVnQmFzZSArIGopOwogICAgICAgICBWZGJl Q29tbWVudCgodiwgIiVzIiwgZXhwbGFpbkluZGV4Q29sdW1uTmFtZShwSWR4LCBqKSkpOwogICAg ICB9CiAgIH0KQEAgLTEyNDUsMTAgKzEyNDMsMTAgQEAgc3FsaXRlM1doZXJlQ29kZU9uZUxvb3BT dGFydChXaGVyZUluZm8gKiBwV0luZm8sICAgLyogQ29tcGxldGUgaW5mb3JtYXRpb24gYWJvdXQg dAogICAgICBhc3NlcnQocFdJbmZvLT5wT3JkZXJCeSA9PSAwCiAgICAgICAgICAgICB8fCBwV0lu Zm8tPnBPcmRlckJ5LT5uRXhwciA9PSAxCiAgICAgICAgICAgICB8fCAocFdJbmZvLT53Y3RybEZs YWdzICYgV0hFUkVfT1JERVJCWV9NSU4pID09IDApOwotICAgICBpbnQgbklkeENvbCA9IGluZGV4 X2NvbHVtbl9jb3VudChwSWR4KTsKKyAgICAgaW50IG5JZHhDb2wgPSBwSWR4LT5kZWYtPmtleV9k ZWYtPnBhcnRfY291bnQ7CiAgICAgIGlmICgocFdJbmZvLT53Y3RybEZsYWdzICYgV0hFUkVfT1JE RVJCWV9NSU4pICE9IDAKICAgICAgICAgICYmIHBXSW5mby0+bk9CU2F0ID4gMCAmJiAobklkeENv bCA+IG5FcSkpIHsKLSAgICAgICAgaiA9IHBJZHgtPmFpQ29sdW1uW25FcV07CisgICAgICAgIGog PSBwSWR4LT5kZWYtPmtleV9kZWYtPnBhcnRzW25FcV0uZmllbGRubzsKICAgICAgICAgLyogQWxs b3cgc2VlayBmb3IgY29sdW1uIHdpd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z cWxpdGUzUHJpbWFyeUtleUluZGV4KHBJZHgtPnBUYWJsZSk7CiAgICAgIGFzc2VydChwayk7Ci0g ICAgIGludCBuUGtDb2wgPSBpbmRleF9jb2x1bW5fY291bnQocGspOworICAgICBpbnQgblBrQ29s ID0gcGstPmRlZi0+a2V5X2RlZi0+cGFydF9jb3VudDsKKyAgICAgdWludDMyX3QgemVyb19maWVs ZG5vID0gcGstPmRlZi0+a2V5X2RlZi0+cGFydHNbMF0uZmllbGRubzsKICAgICAgY2hhciBhZmZp bml0eSA9Ci0gICAgICAgIHBJZHgtPnBUYWJsZS0+ZGVmLT5maWVsZHNbcGstPmFpQ29sdW1uWzBd XS5hZmZpbml0eTsKKyAgICAgICAgcElkeC0+cFRhYmxlLT5kZWYtPmZpZWxkc1t6ZXJvX2ZpZWxk bm9dLmFmZmluaXR5OwogICAgICBpZiAoblBrQ29sID09IDEgJiYgYWZmaW5pdHkgPT0gQUZGSU5J VFlfSU5URUdFUikgewogICAgICAgICAvKiBSaWdodCBub3cgSU5URUdFUiBQUklNQVJZIEtFWSBp cyB0aGUgb25seSBvcHRpb24gdG8KICAgICAgICAgICogZ2V0IFRhcmFudG9vbCdzIElOVEVHRVIg Y29sdW1uIHR5cGUuIE5lZWQgc3BlY2lhbCBoYW5kbGluZwpAQCAtMTM5Nyw3ICsxMzkzLDggQEAg c3FsaXRlM1doZXJlQ29kZU9uZUxvb3BTdGFydChXaGVyZUluZm8gKiBwV0luZm8sIC8qIENvbXBs ZXRlIGluZm9ybWF0aW9uIGFib3V0IHQKICAgICAgICAgICovCiAgICAgICAgIGludCBsaW1pdCA9 IHBSYW5nZVN0YXJ0ID09IE5VTEwgPyBuRXEgOiBuRXEgKyAxOwogICAgICAgICBmb3IgKGludCBp ID0gMDsgaSA8IGxpbWl0OyBpKyspIHsKLSAgICAgICAgICAgaWYgKHBJZHgtPmFpQ29sdW1uW2ld ID09IHBrLT5haUNvbHVtblswXSkgeworICAgICAgICAgICBpZiAocElkeC0+Z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gICAgICAgc3FsaXRlM1ZkYmVBZGRPcDModiwgT1BfQ29sdW1u LCBpSWR4Q3VyLCBrLAogICAgICAgICAgICAgICAgICAgIGlLZXlSZWcgKyBqKTsKICAgICAgICAg fQpAQCAtMTYxNCw3ICsxNjExLDcgQEAgc3FsaXRlM1doZXJlQ29kZU9uZUxvb3BTdGFydChXaGVy ZUluZm8gKiBwV0luZm8sIC8qIENvbXBsZXRlIGluZm9ybWF0aW9uIGFib3V0IHQKICAgICAgICov CiAgICAgIGlmICgocFdJbmZvLT53Y3RybEZsYWdzICYgV0hFUkVfRFVQTElDQVRFU19PSykgPT0g MCkgewogICAgICAgICBJbmRleCAqcFBrID0gc3FsaXRlM1ByaW1hcnlLZXlJbmRleChwVGFiKTsK LSAgICAgICAgaW50IG5Qa0NvbCA9IGluZGV4X2NvbHVtbl9jb3VudChwUGspOworICAgICAgICBp bnQgblBrQ29sID0gcFBrLT5kZWYtPmtleV9kZWYtPnBhcnRfY291bnQ7CiAgICAgICAgIHJlZ1Jv d3NldCA9IHBQYXJzZS0+blRhYisrOwogICAgICAgICBzcWxpdGUzVmRiZUFkZE9wMih2LCBPUF9P cGVuVEVwaGVtZXJhbCwKICAgICAgICAgICAgICAgICByZWdSb3dzZXQsIG5Qa0NvbCk7CkBAIC0x NzE4LDEzICsxNzE1LDE1IEBAIHNxbGl0ZTNXaGVyZUNvZGVPbmVMb29wU3RhcnQoV2hlcmVJbmZv ICogcFdJbmZvLCAgIC8qIENvbXBsZXRlIGluZm9ybWF0aW9uIGFib3V0IHQKICAgICAgICAgICAg ICAgICAgaW50IGlTZXQgPQogICAgICAgICAgICAgICAgICAgICAgKChpaSA9PSBwT3JXYy0+blRl cm0gLSAxKSA/IC0xIDogaWkpOwogICAgICAgICAgICAgICAgICBJbmRleCAqcFBrID0gc3FsaXRl M1ByaW1hcnlLZXlJbmRleCAocFRhYik7Ci0gICAgICAgICAgICAgICAgIGludCBuUGsgPSBpbmRl eF9jb2x1bW5fY291bnQocFBrKTsKKyAgICAgICAgICAgICAgICAgaW50IG5QayA9IHBQay0+ZGVm LT5rZXlfZGVmLT5wYXJ0X2NvdW50OwogICAgICAgICAgICAgICAgICBpbnQgaVBrOwogCiAgICAg ICAgICAgICAgICAgIC8qIFJlYWQgdGhlIFBLIGludG8gYW4gYXJyYXkgb2YgdGVtcCByZWdpc3Rl cnMuICovCiAgICAgICAgICAgICAgICAgIHIgPSBzcWxpdGUzR2V0VGVtcFJhbmdlKHBQYXJzZSwg blBrKTsKICAgICAgICAgICAgICAgICAgZm9yIChpUGsgPSAwOyBpUGsgPCBuUGs7IGlQaysrKSB7 Ci0gICAgICAgICAgICAgICAgICAgIGludCBpQ29sID0gcFBrLT5haUNvbHVtbltpUGtdOworICAg ICAgICAgICAgICAgICAgICBpbnQgaUNvbCA9IHBQay0+ZGVmLT4KKyAgICAgICAgICAgICAgICAg ICAgICAga2V5X2RlZi0+CisgICAgICAgICAgICAgICAgICAgICAgIHBhcnRzW2lQa10uZmllbGRu bzsKICAgICAgICAgICAgICAgICAgICAgc3FsaXRlM0V4cHJDb2RlR2V0Q29sdW1uVG9SZWcKICAg ICAgICAgICAgICAgICAgICAgICAgKHBQYXJzZSwgcFRhYi0+ZGVmLAogICAgICAgICAgICAgICAg ICAgICAgICAgaUNvbCwgaUN1ciwKZGlmZiAtLWdpdCBhL3NyYy9ib3gvc3FsL3doZXJlZXhwci5j IGIvc3JjL2JveC9zcWwvd2hlcmVleHByLmMKaW5kZXggYWE2ZDQ1MjRkLi40MGU0ZTI1NzcgMTAw NjQ0Ci0tLSBhL3NyYy9ib3gvc3FsL3doZXJlZXhwci5jCisrKyBiL3NyYy9ib3gvc3FsL3doZXJl ZXhwci5jCkBAIC05MDMsNyArOTAzLDYgQEAgZXhwck1pZ2h0QmVJbmRleGVkKFNyY0xpc3QgKiBw RnJvbSwgICAgLyogVGhlIEZST00gY2xhdXNlICovCiAgICAgICAgIGludCAqcGlDb2x1bW4gICAv KiBXcml0ZSB0aGUgcmVmZXJlbmNlZCB0YWJsZSBjb2x1bW4gbnVtYmVyIGhlcmUgKi8KICAgICAp CiB7Ci0gIEluZGV4ICpwSWR4OwogICBpbnQgaTsKICAgaW50IGlDdXI7CiAKQEAgLTkzMCwyMCAr OTI5LDYgQEAgZXhwck1pZ2h0QmVJbmRleGVkKFNyY0xpc3QgKiBwRnJvbSwgICAvKiBUaGUgRlJP TSBjbGF1c2UgKi8KICAgZm9yIChpID0gMDsgbVByZXJlcSA+IDE7IGkrKywgbVByZXJlcSA+Pj0g MSkgewogICB9CiAgIGlDdXIgPSBwRnJvbS0+YVtpXS5pQ3Vyc29yOwotICBmb3IgKHBJZHggPSBw RnJvbS0+YVtpXS5wVGFiLT5wSW5kZXg7IHBJZHg7IHBJZHggPSBwSWR4LT5wTmV4dCkgewotICAg ICBpZiAocElkeC0+YUNvbEV4cHIgPT0gMCkKLSAgICAgICAgY29udGludWU7Ci0gICAgIGZvciAo aSA9IDA7IGkgPCBwSWR4LT5uQ29sdW1uOyBpKyspIHsKLSAgICAgICAgaWYgKHBJZHgtPmFpQ29s dW1uW2ldICE9IFhOX0VYUFIpCi0gICAgICAgICAgIGNvbnRpbnVlOwotICAgICAgICBpZiAoc3Fs aXRlM0V4cHJDb21wYXJlCi0gICAgICAgICAgICAocEV4cHIsIHBJZHgtPmFDb2xFeHByLT5hW2ld LnBFeHByLCBpQ3VyKSA9PSAwKSB7Ci0gICAgICAgICAgICpwaUN1ciA9IGlDdXI7Ci0gICAgICAg ICAgICpwaUNvbHVtbiA9IFhOX0VYUFI7Ci0gICAgICAgICAgIHJldHVybiAxOwotICAgICAgICB9 Ci0gICAgIH0KLSAgfQogICByZXR1cm4gMDsKIH0KIAotLSAKMi4xNC4zIChBcHBsZSBHaXQtOTgp Ci0tIApJdmFuIEtvcHRlbG92Cg== ----ALT--ixhgd3Un87Kt3P2a7cLSeRoBvNvOjw2h1528389950 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: base64 CjxIVE1MPjxCT0RZP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nRleHQgKi88YnI+ICAgICAgICAgICAgVmRiZUNvdmVyYWdlKHYpOzxicj4gICAg ICAgICB9PGJyPiAgICAgICAgIGZvciAoaSA9IDA7IGkgJmx0OyBuQ29sVGVzdDsgaSsrKSB7PGJy Pi0gICAgICAgICAgIHVpbnQzMl90IGlkOzxicj4gICAgICAgICAgICBzdHJ1Y3QgY29sbCAqY29s bCA9PGJyPi0gICAgICAgICAgICAgIHNxbF9pbmRleF9jb2xsYXRpb24ocElkeCwgaSwgJmFtcDtp ZCk7PGJyPisgICAgICAgICAgICAgIHBJZHgtJmd0O2RlZi0mZ3Q7a2V5X2RlZi0mZ3Q7cGFydHNb aV0uY29sbDs8YnI+ICAgICAgICAgICAgc3FsaXRlM1ZkYmVBZGRPcDIodiwgT1BfSW50ZWdlciwg aSwgcmVnQ2huZyk7PGJyPiAgICAgICAgICAgIHNxbGl0ZTNWZGJlQWRkT3AzKHYsIE9QX0NvbHVt biwgaUlkeEN1ciw8YnI+LSAgICAgICAgICAgICAgICAgICBwSWR4LSZndDthaUNvbHVtbltpXSwg cmVnVGVtcCk7PGJyPisgICAgICAgICAgICAgICAgICAgcElkeC0mZ3Q7ZGVmLSZndDtrZXlfZGVm LSZndDtwYXJ0c1tpXS5maWVsZG5vLDxicj4rICAgICAgICAgICAgICAgICAgIHJlZ1RlbXApOzxi cj4gICAgICAgICAgICBhR290b0NobmdbaV0gPTxicj4gICAgICAgICAgICAgICAgc3FsaXRlM1Zk YmVBZGRPcDQodiwgT1BfTmUsIHJlZ1RlbXAsIDAsPGJyPiAgICAgICAgICAgICAgICAgICAgICAg IHJlZ1ByZXYgKyBpLCAoY2hhciAqKWNvbGwsPGJyPkBAIC0xMDA2LDcgKzEwMDYsNyBAQCBhbmFs eXplT25lVGFibGUoUGFyc2UgKiBwUGFyc2UsICAvKiBQYXJzZXIgY29udGV4dCAqLzxicj4gICAg ICAgICBmb3IgKGkgPSAwOyBpICZsdDsgbkNvbFRlc3Q7IGkrKykgezxicj4gICA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WN0IGNvbGwgKmNvbGw7PGJyPisgICAgIGlmIChleHByLSZndDtvcCA9 PSBUS19DT0xMQVRFKTxicj4rICAgICAgICBjb2xsID0gc3FsX2dldF9jb2xsX3NlcShwYXJzZSwg ZXhwci0mZ3Q7dS56VG9rZW4sPGJyPisgICAgICAgICAgICAgICAgICZhbXA7Y29sbF9pZCk7PGJy PisgICAgIGVsc2U8YnI+KyAgICAgICAgY29sbCA9IHNxbF9jb2x1bW5fY29sbGF0aW9uKHNwYWNl X2RlZiwgZmllbGRubyw8YnI+KyAgICAgICAgICAgICAgICAgJmFtcDtjb2xsX2lkKTs8YnI+Kzxi cj4rICAgICBpZiAoc3FsaXRlM1N0cklDbXAoZXhwci0mZ3Q7dS56VG9rZW4sICJiaW5hcnkiKSAh PSAwICZhbXA7JmFtcDs8YnI+KyAgICAgICAgIGNvbGwgPT0gTlVMTCAmYW1wOyZhbXA7IGV4cHIt Jmd0O29wID09IFRLX0NPTExBVEUpPGJyPisgICAgICAgIHJldHVybjs8YnI+Kzxicj4rICAgICAv KiBUYXJhbnRvb2w6IERFU0MgaW5kZXhlcyBhcmUgbm90IHN1cHBvcnRlZCBzbyBmYXIuPGJyPisg ICAgICogU2VlIGdoLTMwMTYuPGJyPisgICAgICovPGJyPisgICAgIGtleV9kZWZfc2V0X3BhcnQo a2V5X2RlZiwgaSwgZmllbGRubyw8YnI+KyAgICAgICAgICAgc3BhY2VfZGVmLSZndDtmaWVsZHNb ZmllbGRub10udHlwZSw8YnI+KyAgICAgICAgICAgc3BhY2VfZGVmLSZndDtmaWVsZHNbZmllbGRu b10ubnVsbGFibGVfYWN0aW9uLDxicj4rICAgICAgICAgICBjb2xsLCBjb2xsX2lkLCBTT1JUX09S REVSX0FTQyk7PGJyPisgIH08YnI+Kzxicj4rICBpZiAoaWR4X3R5cGUgPT0gU1FMSVRFX0lEWFRZ UEVfQVBQREVGKTxicj4rICAgICBvcHRzLnNxbCA9IGNyZWF0ZV9zcWwobmFtZSwgdGFibGU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gICAgICAgICBpZiAocElkeC0mZ3Q7ZGVmLSZndDtrZXlfZGVmLSZndDtw YXJ0c1trXS5maWVsZG5vICE9IHBJbmRleC0mZ3Q7ZGVmLSZndDtrZXlfZGVmLSZndDtwYXJ0c1tr XS5maWVsZG5vKTxicj4gICAgICAgICAgICAgICBicmVhazs8YnI+ICAgICAgICAgICAgc3RydWN0 IGNvbGwgKmNvbGwxLCAqY29sbDI7PGJyPi0gICAgICAgICAgIHVpbnQzMl90IGlkOzxicj4tICAg ICAgICAgICBjb2xsMSA9IHNxbF9pbmRleF9jb2xsYXRpb24ocElkeCwgaywgJmFtcDtpZCk7PGJy Pi0gICAgICAgICAgIGNvbGwyID0gc3FsX2luZGV4X2NvbGxhdGlvbihwSW5kZXgsIGssICZhbXA7 aWQpOzxicj4rICAgICAgICAgICBjb2xsMSA9IHBJZHgtJmd0O2RlZi0mZ3Q7a2V5X2RlZi0mZ3Q7 cGFydHNba10uY29sbDs8YnI+KyAgICAgICAgICAgY29sbDIgPSBwSW5kZXgtJmd0O2RlZi0mZ3Q7 a2V5X2RlZi0mZ3Q7cGFydHNba10uY29sbDs8YnI+ICAgICAgICAgICAgaWYgKGNvbGwxICE9IGNv bGwyKTxicj4gICAgICAgICAgICAgICBicmVhazs8YnI+ICAgICAgICAgfTxicj4tICAgICAgICBp ZiAoayA9PSBwSWR4LSZndDtuQ29sdW1uKSB7PGJyPisgICAgICAgIGlmIChrID09IHBJZHgtJmd0 O2RlZi0mZ3Q7a2V5X2RlZi0mZ3Q7cGFydF9jb3VudCkgezxicj4gICAgICAgICAgICBpZiAocElk eC0mZ3Q7b25FcnJvciAhPSBwSW5kZXgtJmd0O29uRXJyb3IpIHs8YnI+ICAgICAgICAgICAgICAg LyogVGhpcyBjb25zdHJhaW50IGNyZWF0ZXMgdGhlIHNhbWUgaW5kZXggYXMgYSBwcmV2aW91czxi cj4gICAgICAgICAgICAgICAgKiBjb25zdHJhaW50IHNwZWNpZmllZCBzb21ld2hlcmUgaW4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kpKSB7PGJyPi0gICAgICAgICAgICAgICAgICAg IGNvbnRpbnVlOyAgLyogVGhpcyBpbmRleCBpcyBub3QgdW5pcXVlIG92ZXIgdGhlIElOIFJIUyBj b2x1bW5zICovPGJyPi0gICAgICAgICAgICAgIH08YnI+KyAgICAgICAgICAgICAgaWYgKChpbnQp cElkeC0mZ3Q7ZGVmLSZndDtrZXlfZGVmLSZndDtwYXJ0X2NvdW50ICZndDsgbkV4cHI8YnI+KyAg ICAgICAgICAgICAgICAgIHx8ICFwSWR4LSZndDtkZWYtJmd0O29wdHMuaXNfdW5pcXVlKTxicj4r ICAgICAgICAgICAgICAgICAvKiBUaGlzIGluZGV4IGlzIG5vdCB1bmlxdWUgb3ZlciB0aGUgSU4g UkhTIGNvbHVtbnMgKi88YnI+KyAgICAgICAgICAgICAgICAgICAgY29udGludWU7PGJyPiAgICAg ICAgICAgIH08YnI+IDxicj4gICAgICAgICAgICBjb2xVc2VkID0gMDsgICAvKiBDb2x1bW5zIG9m IGluZGV4IHVzZWQgc28gZmFyICovPGJyPkBAIC0yNDQ5LDEyICsyNDQ4LDEzIEBAIHNxbGl0ZTNG aW5kSW5JbmRleChQYXJzZSAqIHBQYXJzZSwgLyogUGFyc2luZyBjb250ZXh0ICovPGJyPiAgICAg ICAgICAgICAgIGludCBqOzxicj4gPGJyPiAgICAgICAgICAgICAgIGZvciAoaiA9IDA7IGogJmx0 OyBuRXhwcjsgaisrKSB7PGJyPi0gICAgICAgICAgICAgICAgIGlmIChwSWR4LSZndDthaUNvbHVt bltqXSAhPTxicj4tICAgICAgICAgICAgICAgICAgICAgcFJocy0mZ3Q7aUNvbHVtbikgezxicj4t ICAgICAgICAgICAgICAgICAgICBjb250aW51ZTs8YnI+LSAgICAgICAgICAgICAgICAgfTxicj4t ICAgICAgICAgICAgICAgICBzdHJ1Y3QgY29sbCAqaWR4X2NvbGw7PGJyPi0gICAgICAgICAgICAg ICAgIGlkeF9jb2xsID0gc3FsX2luZGV4X2NvbGxhdGlvbihwSWR4LCBqLCAmYW1wO2lkKTs8YnI+ KyAgICAgICAgICAgICAgICAgaWYgKChpbnQpcElkeC0mZ3Q7ZGVmLSZndDtrZXlfZGVmLSZndDs8 YnI+KyAgICAgICAgICAgICAgICAgICAgcGFydHNbal0uZmllbGRubzxicj4rICAgICAgICAgICAg ICAgICAgICAhPSBwUmhzLSZndDtpQ29sdW1uKTxicj4rICAgICAgICAgICAgICAgICAgICAgICBj b250aW51ZTs8YnI+Kzxicj4rICAgICAgICAgICAgICAgICBzdHJ1Y3QgY29sbCAqaWR4X2NvbGwg PTxicj4rICAgICAgICAgICAgICAgICAgICBwSWR4LSZndDtkZWYtJmd0O2tleV9kZWYtJmd0O3Bh cnRzW2pdLmNvbGw7PGJyPiAgICAgICAgICAgICAgICAgIGlmIChwUmVxICE9IE5VTEwgJmFtcDsm YW1wOzxicj4gICAgICAgICAgICAgICAgICAgICAgcFJlcSAhPSBpZHhfY29sbCkgezxicj4gICAg ICAgICAgICAgICAgICAgICBjb250aW51ZTs8YnI+QEAgLTI0ODMsMTIgKzI0ODMsMTIgQEAgc3Fs aXRlM0ZpbmRJbkluZGV4KFBhcnNlICogcFBhcnNlLCAvKiBQYXJzaW5nIGNvbnRleHQgKi88YnI+ ICAgICAgICAgICAgICAgICAgICAgICAwLCAwLCAwLDxicj4gICAgICAgICAgICAgICAgICAgICAg IHNxbGl0ZTNNUHJpbnRmKGRiLDxicj4gICAgICAgICAgICAgICAgICAgICAgICJVU0lORyBJTkRF WCAlcyBGT1IgSU4tT1BFUkFUT1IiLDxicj4tICAgICAgICAgICAgICAgICAgICAgIHBJZHgtJmd0 O3pOYW1lKSw8YnI+KyAgICAgICAgICAgICAgICAgICAgICBwSWR4LSZndDtkZWYtJmd0O25hbWUp LDxicj4gICAgICAgICAgICAgICAgICAgICAgIFA0X0RZTkFNSUMpOzxicj4gICAgICAgICAgICAg ICBlbWl0X29wZW5fY3Vyc29yKHBQYXJzZSwgaVRhYiw8YnI+ICAgICAgICAgICAgICAgICAgICAg IHBJZHgtJmd0O3RudW0pOzxicj4gICAgICAgICAgICAgICBzcWxfdmRiZV9zZXRfcDRfa2V5X2Rl ZihwUGFyc2UsIHBJZHgpOzxicj4tICAgICAgICAgICAgICBWZGJlQ29tbWVudCgodiwgIiVzIiwg cElkeC0mZ3Q7ek5hbWUpKTs8YnI+KyAgICAgICAgICAgICAgVmRiZUNvbW1lbnQoKHYsICIlcyIs IHBJZHgtJmd0O2RlZi0mZ3Q7bmFtZSkpOzxicj4gICAgICAgICAgICAgICBhc3NlcnQoSU5fSU5E RVhfSU5ERVhfREVTQyA9PTxicj4gICAgICAgICAgICAgICAgICAgICAgSU5fSU5ERVhfSU5ERVhf QVNDICsgMSk7PGJyPiAgICAgICAgICAgICAgIGVUeXBlID0gSU5fSU5ERVhfSU5ERVhfQVNDICs8 YnI+QEAgLTI1MTUsNyArMjUxNSw3IEBAIHNxbGl0ZTNGaW5kSW5JbmRleChQYXJzZSAqIHBQYXJz ZSwgICAvKiBQYXJzaW5nIGNvbnRleHQgKi88YnI+ICAgICAgICAgICAgICAgICAgICAgLyogVGFy YW50b29sOiBDaGVjayBmb3IgbnVsbCBpcyBwZXJmb3JtZWQgb24gZmlyc3Qga2V5IG9mIHRoZSBp bmRleC4gICovPGJyPiAgICAgICAgICAgICAgICAgICAgIHNxbGl0ZTNTZXRIYXNOdWxsRmxhZyh2 LDxicj4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpVGFiLDxicj4tICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICBwSWR4LSZndDthaUNvbHVtblswXSw8YnI+KyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgcElkeC0mZ3Q7ZGVmLSZndDtrZXlfZGVmLSZndDtwYXJ0 c1swXS5maWVsZG5vLDxicj4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqcHJSaHNI YXNOdWxsKTs8YnI+ICAgICAgICAgICAgICAgICAgfTxicj4gICAgICAgICAgICA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IChvciBhIFBSSU1BUlkgS0VZKSBhbmQgaGFzIHRo ZSByaWdodCBudW1iZXI8YnI+ICAgICAgICAgICogb2YgY29sdW1ucy4gSWYgZWFjaCBpbmRleGVk IGNvbHVtbiBjb3JyZXNwb25kcyB0byBhIGZvcmVpZ24ga2V5PGJyPkBAIC0yODcsNyArMjg3LDgg QEAgc3FsaXRlM0ZrTG9jYXRlSW5kZXgoUGFyc2UgKiBwUGFyc2UsICAgLyogUGFyc2UgY29udGV4 dCB0byBzdG9yZSBhbnkgZXJyb3IgaW4gKi88YnI+ICAgICAgICAgICAgICovPGJyPiAgICAgICAg ICAgIGludCBpLCBqOzxicj4gICAgICAgICAgICBmb3IgKGkgPSAwOyBpICZsdDsgbkNvbDsgaSsr KSB7PGJyPi0gICAgICAgICAgICAgIGkxNiBpQ29sID0gcElkeC0mZ3Q7YWlDb2x1bW5baV07ICAv KiBJbmRleCBvZiBjb2x1bW4gaW4gcGFyZW50IHRibCAqLzxicj4rICAgICAgICAgICAgICBpMTYg aUNvbCA9IChpbnQpIHBJZHgtJmd0O2RlZi0mZ3Q7a2V5X2RlZi0mZ3Q7cGFydHNbaV0uZmllbGRu bzsgLyogSW5kZXggb2YgY29sdW1uIGluIHBhcmVudCB0YmwgKi88YnI+Kzxicj4gICAgICAgICAg ICAgICBjaGFyICp6SWR4Q29sOyAvKiBOYW1lIG9mIGluZGV4ZWQgY29sdW1uICovPGJyPiA8YnI+ ICAgICAgICAgICAgICAgaWYgKGlDb2wgJmx0OyAwKTxicj5AQCAtMzAzLDggKzMwNCw3IEBAIHNx bGl0ZTNGa0xvY2F0ZUluZGV4KFBhcnNlICogcFBhcnNlLCAgIC8qIFBhcnNlIGNvbnRleHQgdG8g c3RvcmUgYW55IGVycm9yIGluICovPGJyPiAgICAgICAgICAgICAgICAgICAgICAgICAgIGlDb2ws PGJyPiAgICAgICAgICAgICAgICAgICAgICAgICAgICZhbXA7aWQpOzxicj4gICAgICAgICAgICAg ICBzdHJ1Y3QgY29sbCAqY29sbCA9PGJyPi0gICAgICAgICAgICAgICAgIHNxbF9pbmRleF9jb2xs YXRpb24ocElkeCwgaSw8YnI+LSAgICAgICAgICAgICAgICAgICAgICAgICAgICZhbXA7aWQpOzxi cj4rICAgICAgICAgICAgICAgICBwSWR4LSZndDtkZWYtJmd0O2tleV9kZWYtJmd0O3BhcnRzW2ld LmNvbGw7PGJyPiAgICAgICAgICAgICAgIGlmIChkZWZfY29sbCAhPSBjb2xsKTxicj4gICAgICAg ICAgICAgICAgICBicmVhazs8YnI+IDxicj5AQCAtNDY0LDEzICs0NjQsMTQgQEAgZmtMb29rdXBQ YXJlbnQoUGFyc2UgKiBwUGFyc2UsICAgLyogUGFyc2UgY29udGV4dCAqLzxicj4gICAgICAgICAg ICBmb3IgKGkgPSAwOyBpICZsdDsgbkNvbDsgaSsrKSB7PGJyPiAgICAgICAgICAgICAgIGludCBp Q2hpbGQgPSBhaUNvbFtpXSArIDEgKyByZWdEYXRhOzxicj4gICAgICAgICAgICAgICBpbnQgaVBh cmVudCA9PGJyPi0gICAgICAgICAgICAgICAgICBwSWR4LSZndDthaUNvbHVtbltpXSArIDEgKyBy ZWdEYXRhOzxicj4tICAgICAgICAgICAgICBhc3NlcnQocElkeC0mZ3Q7YWlDb2x1bW5baV0gJmd0 Oz0gMCk7PGJyPisgICAgICAgICAgICAgICAgIChpbnQpIHBJZHgtJmd0O2RlZi0mZ3Q7a2V5X2Rl Zi0mZ3Q7cGFydHNbaV0uZmllbGRubzxicj4rICAgICAgICAgICAgICAgICArIDEgKyByZWdEYXRh Ozxicj4gICAgICAgICAgICAgICBhc3NlcnQoYWlDb2xbaV0gIT0gcFRhYi0mZ3Q7aVBLZXkpOzxi cj4tICAgICAgICAgICAgICBpZiAocElkeC0mZ3Q7YWlDb2x1bW5baV0gPT0gcFRhYi0mZ3Q7aVBL ZXkpIHs8YnI+KyAgICAgICAgICAgICAgaWYgKChpbnQpcElkeC0mZ3Q7ZGVmLSZndDtrZXlfZGVm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yPi0gICAgICAgICAgIFZkYmVD b21tZW50KCh2LCAiJXMgY29sdW1uICVkIiwgcElkeC0mZ3Q7ek5hbWUsPGJyPi0gICAgICAgICAg ICAgICAgICAgaSkpOzxicj4tICAgICAgICB9IGVsc2Ugezxicj4tICAgICAgICAgICAvKiBPUF9T Q29weSBjb3BpZXMgdmFsdWUgaW4gc2VwYXJhdGUgcmVnaXN0ZXIsPGJyPi0gICAgICAgICAgICAq IHdoaWNoIGxhdGVyIHdpbGwgYmUgdXNlZCBieSBPUF9Ob0NvbmZsaWN0Ljxicj4tICAgICAgICAg ICAgKiBCdXQgT1BfTm9Db25mbGljdCBpcyBuZWNlc3Nhcnkgb25seSBpbiBjYXNlczxicj4tICAg ICAgICAgICAgKiB3aGVuIGJ5dGVjb2RlIGlzIG5lZWRlZCBmb3IgcHJvcGVyIFVOSVFVRTxicj4t ICAgICAgICAgICAgKiBjb25zdHJhaW50IGhhbmRsaW5nLjxicj4tICAgICAgICAgICAgKi88YnI+ LSAgICAgICAgICAgaWYgKHVuaXF1ZUJ5dGVDb2RlTmVlZGVkKSB7PGJyPi0gICAgICAgICAgICAg IGlmIChpRmllbGQgPT0gcFRhYi0mZ3Q7aVBLZXkpPGJyPi0gICAgICAgICAgICAgICAgIHggPSBy ZWdOZXdEYXRhOzxicj4tICAgICAgICAgICAgICBlbHNlPGJyPi0gICAgICAgICAgICAgICAgIHgg PSBpRmllbGQgKyByZWdOZXdEYXRhICsgMTs8YnI+LTxicj4tICAgICAgICAgICAgICBhc3NlcnQo aUZpZWxkICZndDs9IDApOzxicj4tICAgICAgICAgICAgICBzcWxpdGUzVmRiZUFkZE9wMih2LCBP UF9TQ29weSw8YnI+LSAgICAgICAgICAgICAgICAgICAgICB4LCByZWdJZHggKyBpKTs8YnI+LSAg ICAgICAgICAgICAgVmRiZUNvbW1lbnQoKHYsICIlcyIsPGJyPi0gICAgICAgICAgICAgICAgICAg ICAgcFRhYi0mZ3Q7ZGVmLSZndDtmaWVsZHNbPG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Db25zdHJhaW50Q2hlY2tzKFBhcnNlICogcFBhcnNlLCAgICAvKiBUaGUgcGFyc2VyIGNvbnRl eHQgKi88YnI+ICAgICAgICAgLyogSWYgUEsgaXMgbWFya2VkIGFzIElOVEVHRVIsIHVzZSBpdCBh cyBzdHJpY3QgdHlwZSw8YnI+ICAgICAgICAgICogbm90IGFzIGFmZmluaXR5LiBFbWl0IGNvZGUg Zm9yIHR5cGUgY2hlY2tpbmcgKi88YnI+ICAgICAgICAgaWYgKG5JZHhDb2wgPT0gMSkgezxicj4t ICAgICAgICAgICByZWdfcGsgPSByZWdOZXdEYXRhICsgMSArIHBJZHgtJmd0O2FpQ29sdW1uWzBd Ozxicj4tICAgICAgICAgICBpZiAocFRhYi0mZ3Q7ekNvbEFmZltwSWR4LSZndDthaUNvbHVtblsw XV0gPT08YnI+KyAgICAgICAgICAgcmVnX3BrID0gcmVnTmV3RGF0YSArIDEgKzxicj4rICAgICAg ICAgICAgICAgcElkeC0mZ3Q7ZGVmLSZndDtrZXlfZGVmLSZndDtwYXJ0c1swXS5maWVsZG5vOzxi cj4rPGJyPisgICAgICAgICAgIGludCBmaWVsZG5vID0gKGludClwSWR4LSZndDtkZWYtJmd0O2tl eV9kZWYtJmd0Ozxicj4rICAgICAgICAgICAgICBwYXJ0c1swXS5maWVsZG5vOzxicj4rICAgICAg ICAgICBpZiAocFRhYi0mZ3Q7ekNvbEFmZltmaWVsZG5vXSA9PTxicj4gICAgICAgICAgICAgICAg QUZGSU5JVFlfSU5URUdFUikgezxicj4gICAgICAgICAgICAgICBpbnQgc2tpcF9pZl9udWxsID0g c3FsaXRlM1ZkYmVNYWtlTGFiZWwodik7PGJyPiAgICAgICAgICAgICAgIGlmICgocFRhYi0mZ3Q7 dGFiRmxhZ3MgJmFtcDsgVEZfQXV0b2luY3JlbWVudCkgIT0gMCkgezxicj5AQCAtMTMxMiw3ICsx MjkxLDcgQEAgc3FsaXRlM0dlbmVyYXRlQ29uc3RyYWludENoZWNrcyhQY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tPT0wKSB7PGJyPisgICAgICAgICAgICAgICAgIHggPSAtMTs8YnI+KyAgICAg ICAgICAgICAgfTxicj4gICAgICAgICAgICAgICBpZiAoaSA9PSAoblBrQ29sIC0gMSkpIHs8YnI+ ICAgICAgICAgICAgICAgICAgYWRkckp1bXAgPSBhZGRyVW5pcXVlT2s7PGJyPiAgICAgICAgICAg ICAgICAgIG9wID0gT1BfRXE7PGJyPkBAIC0xNjIwLDggKzE1OTksOCBAQCBzcWxpdGUzT3BlblRh YmxlQW5kSW5kaWNlcyhQYXJzZSAqIHBQYXJzZSwgICAvKiBQYXJzaW5nIGNvbnRleHQgKi88YnI+ ICAgICAgICAgIElzUHJpbWFyeUtleUluZGV4KHBJZHgpIHx8ICAgIC8qIENvbmRpdGlvbiAyICov PGJyPiAgICAgICAgICBzcWxpdGUzRmtSZWZlcmVuY2VzKHBUYWIpIHx8ICAgLyogQ29uZGl0aW9u IDMgKi88YnI+ICAgICAgICAgIC8qIENvbmRpdGlvbiA0ICovPGJyPi0gICAgICAgICAoaW5kZXhf aXNfdW5pcXVlKHBJZHgpICZhbXA7JmFtcDsgcElkeC0mZ3Q7b25FcnJvciAhPTxicj4tICAgICAg ICAgIE9OX0NPTkZMSUNUX0FDVElPTl9ERUZBVUxUICZhbXA7JmFtcDs8YnI+KyAgICAgICAgIChw SWR4LSZndDtkZWYtJmd0O29wdHMuaXNfdW5pcXVlICZhbXA7JmFtcDsgcElkeC0mZ3Q7b25FcnJv ciAhPTxicj4rICAgICAgICAgICAgICAgICAgIE9OX0NPTkZMSUNUX0FDVElPTl9ERUZBVUxUICZh bXA7JmFtcDs8YnI+ICAgICAgICAgICAvKiBDb25kaXRpb24gNC4xICovPGJyPiAgICAgICAgICAg cElkeC0mZ3Q7b25FcnJvciAhPSBPTl9DT05GTElDVF9BQ1RJT05fQUJPUlQpIHx8PGJyPiAgICAg ICAgICAgLyogQ29uZGl0aW9uIDQuMiAqLzxicj5AQCAtMTYzOSw3ICsxNjE4LDcgQE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bGQgKi88YnI+ICAgICAgICAgICAgICAgc2l6ZV90IGF2Z190dXBs ZV9zaXplX2lkeCA9PGJyPiAgICAgICAgICAgICAgICAgIHNxbF9pbmRleF90dXBsZV9zaXplKHNw YWNlLCBpZHgpOzxicj4gICAgICAgICAgICAgICBzcWxpdGUzVmRiZU11bHRpTG9hZCh2LCAyLCAi c2lpIiw8YnI+LSAgICAgICAgICAgICAgICAgICAgICAgICBwSWR4LSZndDt6TmFtZSw8YnI+KyAg ICAgICAgICAgICAgICAgICAgICAgICBwSWR4LSZndDtkZWYtJmd0O25hbWUsPGJyPiAgICAgICAg ICAgICAgICAgICAgICAgICAgYXZnX3R1cGxlX3NpemVfaWR4LDxicj4gICAgICAgICAgICAgICAg ICAgICAgICAgIGluZGV4X2ZpZWxkX3R1cGxlX2VzdChwSWR4LCAwKSk7PGJyPiAgICAgICAgICAg ICAgIHNxbGl0ZTNWZGJlQWRkT3AyKHYsIE9QX1Jlc3VsdFJvdywgMSw8YnI+QEAgLTQ1OSwxMSAr NDU5LDExIEBAIHNxbGl0ZTNQcmFnbWEoUGFyc2UgKiBwUGFyc2UsIFRva2VuICogcElkLCAgIC8q IEZpcnN0IHBhcnQgb2YgW3NjaGVtYS5daWQgZmllbGQgKi88YnI+ICAgICAgICAgICAgICAgICAg ICovPGJyPiAgICAgICAgICAgICAgICAgIHBQYXJzZS0mZ3Q7bk1lbSA9IDM7PGJyPiAgICAgICAg ICAgICAgIH08YnI+LSAgICAgICAgICAgICAgbXggPSBpbmRleF9jb2x1bW5fY291bnQocElkeCk7 PGJyPisgICAgICAgICAgICAgIG14ID0gcElkeC0mZ3Q7ZGVmLSZndDtrZXlfZGVmLSZndDtwYXJ0 X2NvdW50Ozxicj4gICAgICAgICAgICAgICBhc3NlcnQocFBhcnNlLSZndDtuTWVtICZsdDs9PGJy PiAgICAgICAgICAgICAgICAgICAgICBwUHJhZ21hLSZndDtuUHJhZ0NOYW1lKTs8YnI+ICAgICAg ICAgICAgICAgZm9yIChpID0gMDsgaSAmbHQ7IG14OyBpKyspIHs8YnI+LSAgICAgICAgICAgICAg ICAgaTE2IGNudW0gPSBwSWR4LSZndDthaUNvbHVtbltpXTs8YnI+KyAgICAgICAgICAgICAgICAg aTE2IGNudW0gPSAoaW50KSBwSWR4LSZndDtkZWYtJmd0O2tleV9kZWYtJmd0O3BhcnRzW2ldLmZp ZWxkbm87PGJyPiAgICAgICAgICAgICAgICAgIGFzc2VydChwSWR4LSZndDtwVGFibGUpOzxicj4g ICAgICAgICAgICAgICAgICBzcWxpdGUzVmRiZU11bHRpTG9hZCh2LCAxLDxicj4gICAgICAgICAg ICAgICAgICAgICAgICAgICAgICJpaXMiLCBpLDxicj5AQCAtNDc3LDkgKzQ3NywxMCBAQCBzcWxp dGUzUHJhZ21hKFBhcnNlICogcFBhcnNlLCBUb2tlbiAqIHBJZCwgICAgLyogRmlyc3QgcGFydCBv ZiBbc2NoZW1hLl1pZCBmaWVsZCAqLzxicj4gICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5h bWUpOzxicj4gICAgICAgICAgICAgICAgICBpZiAocFByYWdtYS0mZ3Q7aUFyZykgezxicj4gICAg ICAgICAgICAgICAgICAgICBjb25zdCBjaGFyICpjX247PGJyPi0gICAgICAgICAgICAgICAgICAg IHVpbnQzMl90IGlkOzxicj4rICAgICAgICAgICAgICAgICAgICB1aW50MzJfdCBpZCA9PGJyPisg ICAgICAgICAgICAgICAgICAgICAgIHBJZHgtJmd0O2RlZi0mZ3Q7a2V5X2RlZi0mZ3Q7cGFydHNb aV0uY29sbF9pZDs8YnI+ICAgICAgICAgICAgICAgICAgICAgc3RydWN0IGNvbGwgKmNvbGwgPTxi cj4tICAgICAgICAgICAgICAgICAgICAgICBzcWxfaW5kZXhfY29sbGF0aW9uKHBJZHgsIGksICZh bXA7aWQpOzxicj4rICAgICAgICAgICAgICAgICAgICAgICBwSWR4LSZndDtkZWYtJmd0O2tleV9k ZWYtJmd0O3BhcnRzW2ldLmNvbGw7PGJyPiAgICAgICAgICAgICAgICAgICAgIGlmIChjb2xsICE9 IE5VTEwpPGJyPiAgICAgICAgICAgICAgICAgICAgICAgIGNfbiA9IGNvbGxfYnlfaWQoaWQpLSZn dDtuYW1lOzxicj4gICAgICAgICAgICAgICAgICAgICBlbHNlPGJyPkBAIC01MTksMTAgKzUyMCw4 IEBAIHNxbGl0ZTNQcmFnbWEoUGFyc2UgKiBwUGFyc2UsIFRva2VuICogcElkLCAgICAvKiBGaXJz dCBwYXJ0IG9mIFtzY2hlbWEuXWlkIGZpZWxkICovPGJyPiAgICAgICAgICAgICAgICAgICAgICB7 ICJjIiwgInUiLCAicGsiIH07PGJyPiAgICAgICAgICAgICAgICAgIHNxbGl0ZTNWZGJlTXVsdGlM b2FkKHYsIDEsPGJyPiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgImlzaXNpIiwgaSw8YnI+ LSAgICAgICAgICAgICAgICAgICAgICAgICAgICBwSWR4LSZndDs8YnI+LSAgICAgICAgICAgICAg ICAgICAgICAgICAgICB6TmFtZSw8YnI+LSAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbmRl eF9pc191bmlxdWU8YnI+LSAgICAgICAgICAgICAgICAgICAgICAgICAgICAocElkeCksPGJyPisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgcElkeC0mZ3Q7ZGVmLSZndDtuYW1lLDxicj4rICAg ICAgICAgICAgICAgICAgICAgICAgICAgIHBJZHgtJmd0O2RlZi0mZ3Q7b3B0cy5pc191bmlxdWUs PGJyPiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXpPcmlnaW48YnI+ICAgICAgICAgICAg ICAgICAgICAgICAgICAgICBbcElkeC0mZ3Q7PGJyPiAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIGlkeFR5cGVdLDxicj5kaWZmIC0tZ2l0IGEvc3JjL2JveC9zcWwvc2VsZWN0LmMgYi9zcmMv Ym94L3NxbC9zZWxlY3QuYzxicj5pbmRleCAyYWEzNWExMTQuLjI2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XS5maWVsZG5vKSB7PGJyPiAg ICAgICAgIGJvb2wgaXNfZm91bmQ7PGJyPiAgICAgICAgIHVpbnQzMl90IGlkOzxicj4gICAgICAg ICBzdHJ1Y3QgY29sbCAqY29sbCA9IHNxbF9leHByX2NvbGwocFBhcnNlLDxicj4gICAgICAgICAg ICAgICAgICAgICAgIHBMaXN0LSZndDthW2ldLnBFeHByLDxicj4gICAgICAgICAgICAgICAgICAg ICAgICZhbXA7aXNfZm91bmQsICZhbXA7aWQpOzxicj4gICAgICAgICBpZiAoaXNfZm91bmQgJmFt cDsmYW1wOzxicj4tICAgICAgICAgICAgY29sbCA9PSBzcWxfaW5kZXhfY29sbGF0aW9uKHBJZHgs IGlDb2wsICZhbXA7aWQpKSB7PGJyPisgICAgICAgICAgICBjb2xsID09IHBJZHgtJmd0O2RlZi0m Z3Q7a2V5X2RlZi0mZ3Q7cGFydHNbaUNvbF0uY29sbCkgezxicj4gICAgICAgICAgICByZXR1cm4g aTs8YnI+ICAgICAgICAgfTxicj4gICAgICB9PGJyPkBAIC00ODQsMjcgKzQ4Niw2IEBAIGZpbmRJ bmRleENvbChQYXJzZSAqIHBQYXJzZSwgIC8qIFBhcnNlIGNvbnRleHQgKi88YnI+ICAgcmV0dXJu IC0xOzxicj4gfTxicj4gPGJyPi0vKjxicj4tICogUmV0dXJuIFRSVUUgaWYgdGhlIGlDb2wtdGgg Y29sdW1uIG9mIGluZGV4IHBJZHggaXMgTk9UIE5VTEw8YnI+LSAqLzxicj4tc3RhdGljIGludDxi cj4taW5kZXhDb2x1bW5Ob3ROdWxsKEluZGV4ICogcElkeCwgaW50IGlDb2wpPGJyPi17PGJyPi0g IGludCBqOzxicj4tICBhc3NlcnQocElkeCAhPSAwKTs8YnI+LSAgYXNzZXJ0KGlDb2wgJmd0Oz0g MCAmYW1wOyZhbXA7IGlDb2wgJmx0OyAoaW50KWluZGV4X2NvbHVtbl9jb3VudChwSWR4KSk7PGJy Pi0gIGogPSBwSWR4LSZndDthaUN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gICogKHJldklkeCkgZm9yIHRoZSBqLXRoIGNvbHVtbiBvZiB0aGUgaW5kZXgu PGJyPiAgICAgICAgICAgICAqLzxicj4gICAgICAgICAgICBpZiAocEluZGV4KSB7PGJyPi0gICAg ICAgICAgICAgIGlDb2x1bW4gPSBwSW5kZXgtJmd0O2FpQ29sdW1uW2pdOzxicj4rICAgICAgICAg ICAgICBpQ29sdW1uID0gcEluZGV4LSZndDtkZWYtJmd0O2tleV9kZWYtJmd0O3BhcnRzW2pdLmZp ZWxkbm87PGJyPiAgICAgICAgICAgICAgIHJldklkeCA9IHNxbF9pbmRleF9jb2x1bW5fc29ydF9v cmRlcihwSW5kZXgsPGJyPiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaik7PGJyPiAg ICAgICAgICAgICAgIGlmIChpQ29sdW1uID09IHBJbmRleC0mZ3Q7cFRhYmxlLSZndDtpUEtleSk8 YnI+QEAgLTM0NDIsOCArMzQzNyw3IEBAIHdoZXJlUGF0aFNhdGlzZmllc09yZGVyQnkoV2hlcmVJ bmZvICogcFdJbmZvLCAgICAvKiBUaGUgV0hFUkUgY2xhdXNlICovPGJyPiAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIHBPcmRlckJ5LSZndDthW2ldLnBFeHByLDxicj4gICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAmYW1wO2lzX2ZvdW5kLCAmYW1wO2lkKTs8YnI+ICAgICAgICAgICAg ICAgICAgc3RydWN0IGNvbGwgKmlkeF9jb2xsID08YnI+LSAgICAgICAgICAgICAgICAgICAgc3Fs X2luZGV4X2NvbGxhdGlvbihwSW5kZXgsPGJyPi0gICAgICAgICAgICAgICAgICAgICAgICAgICAg ICBqLCAmYW1wO2lkKTs8YnI+KyAgICAgICAgICAgICAgICAgICAgcEluZGV4LSZndDtkZWYtJmd0 O2tleV9kZWYtJmd0O3BhcnRzW2pdLmNvbGw7PGJyPiAgICAgICAgICAgICAgICAgIGlmIChpc19m b3VuZCAmYW1wOyZhbXA7PGJyPiAgICAgICAgICAgICAgICAgICAgICBjb2xsICE9IGlkeF9jb2xs KTxicj4gICAgICAgICAgICAgICAgICAgICBjb250aW51ZTs8YnI+QEAgLTQxMDUsOSArNDA5OSw5 IEBAIHdoZXJlU2hvcnRDdXQoV2hlcmVMb29wQnVpbGRlciAqIHBCdWlsZGVyKTxicj4gICB9IGVs c2Ugezxicj4gICAgICBmb3IgKHBJZHggPSBwVGFiLSZndDtwSW5kZXg7IHBJZHg7IHBJZHggPSBw SWR4LSZndDtwTmV4dCkgezxicj4gICAgICAgICBpbnQgb3BNYXNrOzxicj4tICAgICAgICBpbnQg bklkeENvbCA9IGluZGV4X2NvbHVtbl9jb3VudChwSWR4KTs8YnI+KyAgICAgICAgaW50IG5JZHhD b2wgPSBwSWR4LSZndDtkZWYtJmd0O2tleV9kZWYtJmd0O3BhcnRfY291bnQ7PGJyPiAgICAgICAg IGFzc2VydChwTG9vcC0mZ3Q7YUxUZXJtU3BhY2UgPT0gcExvb3AtJmd0O2FMVGVybSk7PGJyPi0g ICAgICAgIGlmICghaW5kZXhfaXNfdW5pcXVlKHBJZHgpPGJyPisgICAgICAgIGlmICghcElkeC0m Z3Q7ZGVmLSZndDtvcHRzLmlzX3VuaXF1ZTxicj4gICAgICAgICAgICAgfHwgcElkeC0mZ3Q7cFBh cnRJZHhXaGVyZSAhPSAwPGJyPiAgICAgICAgICAgICB8fCBuSWR4Q29sICZndDsgQXJyYXlTaXpl KHBMb29wLSZndDthTFRlcm1TcGFjZSk8YnI+ICAgICAgICAgICAgICk8YnI+QEAgLTQ2NTAsNyAr NDY0NCw3IEBAIHNxbGl0ZTNXaGVyZUJlZ2luKFBhcnNlICogcFBhcnNlLCAgICAvKiBUaGUgcGFy c2VyIGNvbnRleHQgKi88YnI+ICAgICAgICAgICAgICAgd2N0cmxGbGFncyAmYW1wOyBXSEVSRV9P UkRFUkJZX01JTikgPT0gMCkgezxicj4gICAgICAgICAgICAgICBzcWxpdGUzVmRiZUNoYW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ocFBrKTs8YnI+KyAgICAg ICAgaW50IG5Qa0NvbCA9IHBQay0mZ3Q7ZGVmLSZndDtrZXlfZGVmLSZndDtwYXJ0X2NvdW50Ozxi cj4gICAgICAgICByZWdSb3dzZXQgPSBwUGFyc2UtJmd0O25UYWIrKzs8YnI+ICAgICAgICAgc3Fs aXRlM1ZkYmVBZGRPcDIodiwgT1BfT3BlblRFcGhlbWVyYWwsPGJyPiAgICAgICAgICAgICAgICAg cmVnUm93c2V0LCBuUGtDb2wpOzxicj5AQCAtMTcxOCwxMyArMTcxNSwxNSBAQCBzcWxpdGUzV2hl cmVDb2RlT25lTG9vcFN0YXJ0KFdoZXJlSW5mbyAqIHBXSW5mbywgICAvKiBDb21wbGV0ZSBpbmZv cm1hdGlvbiBhYm91dCB0PGJyPiAgICAgICAgICAgICAgICAgIGludCBpU2V0ID08YnI+ICAgICAg ICAgICAgICAgICAgICAgICgoaWkgPT0gcE9yV2MtJmd0O25UZXJtIC0gMSkgPyAtMSA6IGlpKTs8 YnI+ICAgICAgICAgICAgICAgICAgSW5kZXggKnBQayA9IHNxbGl0ZTNQcmltYXJ5S2V5SW5kZXgg KHBUYWIpOzxicj4tICAgICAgICAgICAgICAgICBpbnQgblBrID0gaW5kZXhfY29sdW1uX2NvdW50 KHBQayk7PGJyPisgICAgICAgICAgICAgICAgIGludCBuUGsgPSBwUGstJmd0O2RlZi0mZ3Q7a2V5 X2RlZi0mZ3Q7cGFydF9jb3VudDs8YnI+ICAgICAgICAgICAgICAgICAgaW50IGlQazs8YnI+IDxi cj4gICAgICAgICAgICAgICAgICAvKiBSZWFkIHRoZSBQSyBpbnRvIGFuIGFycmF5IG9mIHRlbXAg cmVnaXN0ZXJzLiAqLzxicj4gICAgICAgICAgICAgICAgICByID0gc3FsaXRlM0dldFRlbXBSYW5n ZShwUGFyc2UsIG5Qayk7PGJyPiAgICAgICAgICAgICAgICAgIGZvciAoaVBrID0gMDsgaVBrICZs dDsgblBrOyBpUGsrKykgezxicj4tICAgICAgICAgICAgICAgICAgICBpbnQgaUNvbCA9IHBQay0m Z3Q7YWlDb2x1bW5baVBrXTs8YnI+KyAgICAgICAgICAgICAgICAgICAgaW50IGlDb2wgPSBwUGst Jmd0O2RlZi0mZ3Q7PGJyPisgICAgICAgICAgICAgICAgICAgICAgIGtleV9kZWYtJmd0Ozxicj4r ICAgICAgICAgICAgICAgICAgICAgICBwYXJ0c1tpUGtdLmZpZWxkbm87PGJyPiAgICAgICAgICAg ICAgICAgICAgIHNxbGl0ZTNFeHByQ29kZUdldENvbHVtblRvUmVnPGJyPiAgICAgICAgICAgICAg ICAgICAgICAgIChwUGFyc2UsIHBUYWItJmd0O2RlZiw8YnI+ICAgICAgICAgICAgICAgICAgICAg ICAgIGlDb2wsIGlDdXIsPGJyPmRpZmYgLS1naXQgYS9zcmMvYm94L3NxbC93aGVyZWV4cHIuYyBi L3NyYy9ib3gvc3FsL3doZXJlZXhwci5jPGJyPmluZGV4IGFhNmQ0NTI0ZC4uNDBlNGUyNTc3IDEw MDY0NDxicj4tLS0gYS9zcmMvYm94L3NxbC93aGVyZWV4cHIuYzxicj4rKysgYi9zcmMvYm94L3Nx bC93aGVyZWV4cHIuYzxicj5AQCAtOTAzLDcgKzkwMyw2IEBAIGV4cHJNaWdodEJlSW5kZXhlZChT cmNMaXN0ICogcEZyb20sICAgIC8qIFRoZSBGUk9NIGNsYXVzZSAqLzxicj4gICAgICAgICBpbnQg KnBpQ29sdW1uICAgLyogV3JpdGUgdGhlIHJlZmVyZW5jZWQgdGFibGUgY29sdW1uIG51bWJlciBo ZXJlICovPGJyPiAgICAgKTxicj4gezxicj4tICBJbmRleCAqcElkeDs8YnI+ICAgaW50IGk7PGJy PiAgIGludCBpQ3VyOzxicj4gPGJyPkBAIC05MzAsMjAgKzkyOSw2IEBAIGV4cHJNaWdodEJlSW5k ZXhlZChTcmNMaXN0ICogcEZyb20sICAgLyogVGhlIEZST00gY2xhdXNlICovPGJyPiAgIGZvciAo aSA9IDA7IG1Q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