Received: from [140.186.70.92] (port=58344 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q6TQn-0000wG-F0 for qemu-devel@nongnu.org; Sun, 03 Apr 2011 15:57:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q6TQl-000500-KA for qemu-devel@nongnu.org; Sun, 03 Apr 2011 15:57:52 -0400 Received: from mail-wy0-f173.google.com ([74.125.82.173]:57023) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q6TQl-0004zu-G5 for qemu-devel@nongnu.org; Sun, 03 Apr 2011 15:57:51 -0400 Received: by wyb42 with SMTP id 42so4661773wyb.4 for ; Sun, 03 Apr 2011 12:57:50 -0700 (PDT) Date: Sun, 3 Apr 2011 21:57:46 +0200 From: "Edgar E. Iglesias" Message-ID: <20110403195746.GA25253@laped.lan> References: <1301859396-9701-1-git-send-email-weil@mail.berlios.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1301859396-9701-1-git-send-email-weil@mail.berlios.de> Subject: [Qemu-devel] Re: [PATCH] tests/cris: Fix some errors and potential crashes List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Weil Cc: QEMU Developers On Sun, Apr 03, 2011 at 09:36:36PM +0200, Stefan Weil wrote: > These errors were reported by cppcheck: > > tests/cris/check_openpf1.c:30: error: > Mismatching allocation and deallocation: f > > tests/cris/check_openpf2.c:13: error: > Mismatching allocation and deallocation: f > > tests/cris/check_stat3.c:16: error: > Buffer overrun possible for long cmd-line args > > tests/cris/check_stat4.c:18: error: > Buffer overrun possible for long cmd-line args > > The first two are obvious coding errors (fopen needs fclose, not close). > > The last two may seem less important (nobody will start test code > with an argument of more than 1022 characters which raises a buffer > overrun). Fixing them nevertheless helps with static code checks > like those done by cppcheck. Thanks, I've applied this. Cheers