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 1i13ff-0003yZ-V4 for barebox@lists.infradead.org; Fri, 23 Aug 2019 07:07:42 +0000 Date: Fri, 23 Aug 2019 09:07:36 +0200 From: Sascha Hauer Message-ID: <20190823070736.mx3z4hkbhaoezvtg@pengutronix.de> References: <20190731102143.20503-1-a.fatoum@pengutronix.de> <20190731102143.20503-3-a.fatoum@pengutronix.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: 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: Ahmad Fatoum Cc: barebox@lists.infradead.org, Bastian Krause 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. 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