From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1i15sC-00044W-QR for barebox@lists.infradead.org; Fri, 23 Aug 2019 09:28:46 +0000 References: <20190731102143.20503-1-a.fatoum@pengutronix.de> <20190731102143.20503-3-a.fatoum@pengutronix.de> <20190823070736.mx3z4hkbhaoezvtg@pengutronix.de> From: Ahmad Fatoum Message-ID: Date: Fri, 23 Aug 2019 11:28:43 +0200 MIME-Version: 1.0 In-Reply-To: <20190823070736.mx3z4hkbhaoezvtg@pengutronix.de> Content-Language: en-US List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: Re: [PATCH v2 3/3] console: fix out-of-bounds read in dputc(/dev/*, ...) To: Sascha Hauer Cc: barebox@lists.infradead.org, Bastian Krause Hello Sascha, On 8/23/19 9:07 AM, Sascha Hauer wrote: > On Thu, Aug 22, 2019 at 09:06:09AM +0200, Ahmad Fatoum wrote: >> Hello Sascha, >> >> On 7/31/19 12:21 PM, Ahmad Fatoum wrote: >>> Trying to output a single character via >>> echo -a /dev/serial0-1 >>> currently results in garbage output after the newline, because console.c's >>> fops_write discards the buffer length and passes the buffer to >>> (struct cdev)::puts which only handles NUL-terminated strings. >>> >>> Fix this by amending (struct cdev)::puts with a new nbytes parameter, >>> which is correctly propagated. >> >> Can this one be merged? It doesn;t depend on the other two patches. > > Ok. Can you rebase it? Without the others it doesn't seem to apply. done. I dropped the RATP one, but squashed the other. > > Sascha > -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox