From mboxrd@z Thu Jan 1 00:00:00 1970 From: lm@mcvoy.com (Larry McVoy) Date: Fri, 16 Feb 2018 08:32:00 -0800 Subject: [TUHS] Clueless programmers In-Reply-To: References: Message-ID: <20180216163200.GC14249@mcvoy.com> We had the same problem that was uncovered by a naive programmer "removing unneeded whitespaces". Moved some stuff around and exposed a buffer overrun. On Fri, Feb 16, 2018 at 10:54:50PM +0700, Rudi Blom wrote: > Clueless or careless? > > A customer program worked for many years till one of the transaction > messages had a few bytes added. > > Looking into it I discovered that the program had only worked because > the receive buffer was followed by another buffer which was used in a > later sequence. Only when also that buffer overflowed some critical > integers got overwritten and used as index in tables that gave a lot > of fun. > > Well, as all here know, C is fun :-) -- --- Larry McVoy lm at mcvoy.com http://www.mcvoy.com/lm