From mboxrd@z Thu Jan 1 00:00:00 1970 From: Minkyu Kang Date: Mon, 16 Dec 2013 09:48:52 +0900 Subject: [U-Boot] [PATCH v3 1/4] mkexynosspl: fix uninitialized buffer In-Reply-To: <20131214111439.79d43a3c@lilith> References: <1386608961-15503-1-git-send-email-albert.u.boot@aribaud.net> <20131213100000.41df0c9d@lilith> <52ABE7AD.2060305@samsung.com> <20131214111439.79d43a3c@lilith> Message-ID: <52AE4DF4.4070104@samsung.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Albert ARIBAUD, On 14/12/13 19:14, Albert ARIBAUD wrote: > Hi Minkyu, > > On Sat, 14 Dec 2013 14:07:57 +0900, Minkyu Kang > wrote: > >> Dear Albert, >> >> On 13/12/13 18:00, Albert ARIBAUD wrote: >>> (adding Minkyu as the Samsung custodian) >>> >>> On Mon, 9 Dec 2013 18:09:18 +0100, Albert ARIBAUD >>> wrote: >>> >>>> mkexynos reads its input file which might be smaller than >>> >>> ( typo: s/mkexynos/mkexynosspl/ -- wil fix when applying if thee is >>> no other change to be made ) >>> >>>> its read buffer, but always writes the whole buffer out. >>>> This does not affect the functionalyty of the output file, > > ... and s/functionalyty/functionality/, too. > >>>> but it makes its content unpredictable as the end of the >>>> buffer is never initialized. Fix this by zeroing the buffer >>>> before reading the input file. >>> >>> Minkyu: should the buffer be pre-filled with zeroes or should I use >>> ones instead? Or maybe the output could be truncated to the size of the >>> input? >> >> Basically, the output file is fixed to 14K as same as buffer size. >> And the input file should be smaller than 14K. >> It's the rule of exynos spl. >> The role of mkexynosspl is just adding 4 byte checksum value to end of file. >> If the input file is bigger than 14K, output will be truncated. >> >>> >>> Amicalement, >>> Albert. >>> >>>> Signed-off-by: Albert ARIBAUD >> >> btw, this change looks reasonable to me. >> >> Acked-by: Minkyu Kang > > Thanks! If that's ok with you, I'll apply 1/4 to ARM, considering it a > kind of bugfix, and remove it from V4 of the patch series if there is > any. > > Or if you prefer to apply 1/4 to u-boot-samsung, that's fine with me. please apply this patch to u-boot-arm. > >> Thanks, >> Minkyu Kang. > > Amicalement, > Thanks, Minkyu Kang.