From patchwork Fri Feb 10 11:14:29 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colin Ian King X-Patchwork-Id: 140561 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from chlorine.canonical.com (chlorine.canonical.com [91.189.94.204]) by ozlabs.org (Postfix) with ESMTP id 0D84DB6F99 for ; Fri, 10 Feb 2012 22:14:36 +1100 (EST) Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1RvoQx-00048k-Rf for incoming@patchwork.ozlabs.org; Fri, 10 Feb 2012 11:14:31 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1RvoQw-00048e-2f for fwts-devel@lists.ubuntu.com; Fri, 10 Feb 2012 11:14:30 +0000 Received: from cpc19-craw6-2-0-cust5.croy.cable.virginmedia.com ([77.102.228.6] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1RvoQv-0007MM-VZ for fwts-devel@lists.ubuntu.com; Fri, 10 Feb 2012 11:14:30 +0000 From: Colin King To: fwts-devel@lists.ubuntu.com Subject: [PATCH] uefi: eufidump: fix infinite recursion on unknown end terminator Date: Fri, 10 Feb 2012 11:14:29 +0000 Message-Id: <1328872469-18154-1-git-send-email-colin.king@canonical.com> X-Mailer: git-send-email 1.7.9 X-BeenThere: fwts-devel@lists.ubuntu.com X-Mailman-Version: 2.1.13 Precedence: list List-Id: Firmware Test Suite Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: fwts-devel-bounces@lists.ubuntu.com Errors-To: fwts-devel-bounces@lists.ubuntu.com From: Colin Ian King Signed-off-by: Colin Ian King Nacked-by: Colin King --- src/uefi/uefidump/uefidump.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/uefi/uefidump/uefidump.c b/src/uefi/uefidump/uefidump.c index 6c5fbd4..9a12dc7 100644 --- a/src/uefi/uefidump/uefidump.c +++ b/src/uefi/uefidump/uefidump.c @@ -64,14 +64,14 @@ static char *uefidump_vprintf(char *str, const char *fmt, ...) static char *uefidump_build_dev_path(char *path, fwts_uefi_dev_path *dev_path) { switch (dev_path->type & 0x7f) { +printf("%x %s\n", dev_path->type, path); case FWTS_UEFI_END_DEV_PATH_TYPE: switch (dev_path->subtype) { case FWTS_UEFI_END_ENTIRE_DEV_PATH_SUBTYPE: case FWTS_UEFI_END_THIS_DEV_PATH_SUBTYPE: break; default: - path = uefidump_vprintf(path, "\\Unknown-End(0x%x)", (unsigned int) dev_path->subtype); - break; + return uefidump_vprintf(path, "\\Unknown-End(0x%x)", (unsigned int) dev_path->subtype); } break; case FWTS_UEFI_HARDWARE_DEV_PATH_TYPE: