From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id 5AA8F6EC5B; Wed, 3 Mar 2021 02:08:16 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 5AA8F6EC5B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1614726496; bh=nEX2T/lNvJTZZPns1//8yBzNNqdEKyOFH9JdKzNghdM=; h=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=iKiCPZRK9EX9bD7CKY2jqe59VzzDu+//aEh7Xr5jvIrHKVNX8QLCWakYHoJpe5+EQ ZdVM4sjGw3SmU089rjGTPnA2Ksmm5QNU1Elxl+a9rh3XnxAYlSVf945ZIeGX2fMhZ8 4BXeeLgWI1MnR7iZbmyKILsFfaCmOgl9+/5grS3I= Received: from smtp59.i.mail.ru (smtp59.i.mail.ru [217.69.128.39]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 4C0ED6EC5B for ; Wed, 3 Mar 2021 02:08:14 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 4C0ED6EC5B Received: by smtp59.i.mail.ru with esmtpa (envelope-from ) id 1lHE7h-0005ZK-2k; Wed, 03 Mar 2021 02:08:13 +0300 Date: Wed, 3 Mar 2021 02:08:20 +0300 To: Sergey Nikiforov Message-ID: <20210302230820.4kiad5inxhbitkkl@tkn_work_nb> References: <5cbe765bbcfaa1d23a0ffa3ee29e74e2089f7466.1614601625.git.void@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <5cbe765bbcfaa1d23a0ffa3ee29e74e2089f7466.1614601625.git.void@tarantool.org> X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD92A98208ECBDD29F592DFB44E0F725E61F2319814AA890CAA182A05F538085040E4449D16243DC072ABB8B79497E6BBE1D864E4ED165EB33A345ED765BB9AA147 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7A8325FA649D0A450EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637B997C8222C70C3D98638F802B75D45FF914D58D5BE9E6BC131B5C99E7648C95CDB1C6D2319E1F167E888FD3340ABC8CB3FBE5F35554DAC87A471835C12D1D9774AD6D5ED66289B5259CC434672EE6371117882F4460429724CE54428C33FAD30A8DF7F3B2552694AC26CFBAC0749D213D2E47CDBA5A9658378DA827A17800CE77A825AB47F0FC8649FA2833FD35BB23DF004C90652538430302FCEF25BFAB3454AD6D5ED66289B5278DA827A17800CE79BD8AF76C0F3A847D32BA5DBAC0009BE395957E7521B51C20BC6067A898B09E4090A508E0FED6299176DF2183F8FC7C097E41EE4A7E2439DCD04E86FAF290E2D7E9C4E3C761E06A7089D37D7C0E48F6CA18204E546F3947C83C798A30B85E16B262FEC7FBD7D1F5BC8A9BA7A39EFB7666BA297DBC24807EA089D37D7C0E48F6C8AA50765F79006373568875668442E59EFF80C71ABB335746BA297DBC24807EA27F269C8F02392CD4DF8A859A081327B27F269C8F02392CD5571747095F342E88FB05168BE4CE3AF X-B7AD71C0: AC4F5C86D027EB782CDD5689AFBDA7A2BBE337FB72E92315FF39D8DB89857825743D937135AA13FF7120598F3739033D109B151A58CD633FF0AFF96BAACF4158FD03B445380DD007834459D11680B50566611A3325165B884B7ED06F66B238DD X-C1DE0DAB: 0D63561A33F958A58F434C9C24803FC48E8FC47BE8ED3B168170F4CCB7C8C108D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA75448CF9D3A7B2C848410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D349EC559D073CA5B687F8CFB68D4751A05A5BF091334203922CF2E99F8B5BBB2389AE3E3E63558E0621D7E09C32AA3244C0ADCF75B1D8FA2C6096A8E7744C1C446259227199D06760A927AC6DF5659F194 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojnllmSZCgRqvCUS/sOi8grg== X-Mailru-Sender: FFAA8E4AEE17E37C3731A083A1A85ADEB6E6FAAB9867D4A08F7DC49432688476B7EA9FE7735C3DBFC664A44C781FCEA7C77752E0C033A69EDF9F2CE1E9CF805D8CD356D4F938FF726C18EFA0BB12DBB0 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v7] base64: fix decoder output buffer overrun (reads) X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Alexander Turenko via Tarantool-patches Reply-To: Alexander Turenko Cc: tarantool-patches@dev.tarantool.org, Vladislav Shpilevoy Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" > -static int > -base64_decode_block(const char *in_base64, int in_len, > - char *out_bin, int out_len, > - struct base64_decodestate *state) > +int > +base64_decode(const char *in_base64, int in_len, > + char *out_bin, int out_len) > { > const char *in_pos = in_base64; > const char *in_end = in_base64 + in_len; > char *out_pos = out_bin; > char *out_end = out_bin + out_len; > int fragment; > + char curr_byte; AFAIR, nothing prevent us from using `*out_pos`. I don't see a reason to introduce `curr_byte`. It was necessary in v6 to store the initial state for a block.