diff mbox

uefi: eufidump: fix infinite recursion on unknown end terminator (v2)

Message ID 1328872771-23450-1-git-send-email-colin.king@canonical.com
State Accepted
Headers show

Commit Message

Colin Ian King Feb. 10, 2012, 11:19 a.m. UTC
From: Colin Ian King <colin.king@canonical.com>

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 src/uefi/uefidump/uefidump.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

Comments

Keng-Yu Lin Feb. 21, 2012, 3:21 a.m. UTC | #1
On Fri, Feb 10, 2012 at 7:19 PM, Colin King <colin.king@canonical.com> wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  src/uefi/uefidump/uefidump.c |    3 +--
>  1 files changed, 1 insertions(+), 2 deletions(-)
>
> diff --git a/src/uefi/uefidump/uefidump.c b/src/uefi/uefidump/uefidump.c
> index 6c5fbd4..a08b629 100644
> --- a/src/uefi/uefidump/uefidump.c
> +++ b/src/uefi/uefidump/uefidump.c
> @@ -70,8 +70,7 @@ static char *uefidump_build_dev_path(char *path, fwts_uefi_dev_path *dev_path)
>                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:
> --
> 1.7.9
>
Acked-by: Keng-Yu Lin <kengyu@canonical.com>
Alex Hung March 6, 2012, 9:44 a.m. UTC | #2
On 02/10/2012 07:19 PM, Colin King wrote:
> From: Colin Ian King<colin.king@canonical.com>
>
> Signed-off-by: Colin Ian King<colin.king@canonical.com>
> ---
>   src/uefi/uefidump/uefidump.c |    3 +--
>   1 files changed, 1 insertions(+), 2 deletions(-)
>
> diff --git a/src/uefi/uefidump/uefidump.c b/src/uefi/uefidump/uefidump.c
> index 6c5fbd4..a08b629 100644
> --- a/src/uefi/uefidump/uefidump.c
> +++ b/src/uefi/uefidump/uefidump.c
> @@ -70,8 +70,7 @@ static char *uefidump_build_dev_path(char *path, fwts_uefi_dev_path *dev_path)
>   		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:
Acked-by: Alex Hung <alex.hung@canonical.com>
diff mbox

Patch

diff --git a/src/uefi/uefidump/uefidump.c b/src/uefi/uefidump/uefidump.c
index 6c5fbd4..a08b629 100644
--- a/src/uefi/uefidump/uefidump.c
+++ b/src/uefi/uefidump/uefidump.c
@@ -70,8 +70,7 @@  static char *uefidump_build_dev_path(char *path, fwts_uefi_dev_path *dev_path)
 		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: