[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Double buffer for fdasd_check_api_version (#693852)
From: |
Jim Meyering |
Subject: |
Re: [PATCH] Double buffer for fdasd_check_api_version (#693852) |
Date: |
Thu, 21 Apr 2011 09:41:57 +0200 |
Brian C. Lane wrote:
> diff --git a/libparted/labels/fdasd.c b/libparted/labels/fdasd.c
> int api;
> - char s[LINE_LENGTH];
> + char s[2*LINE_LENGTH];
>
> struct stat st;
> if (fstat (f, &st) == 0 && S_ISREG (st.st_mode)) {
Thank you for that patch.
Sorry I didn't apply that sooner.
I saw it for the first time only minutes ago.
From 311e9a7ec0ed5a2e9df855640e53eba534662376 Mon Sep 17 00:00:00 2001
From: Brian C. Lane <address@hidden>
Date: Thu, 21 Apr 2011 09:36:08 +0200
Subject: [PATCH] s390/dasd: avoid buffer overrun upon API mismatch diagnostic
* libparted/labels/fdasd.c (fdasd_check_api_version): The static
buffer for the error string was too small. Double its length.
This resolves http://bugzilla.redhat.com/693852
---
libparted/labels/fdasd.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/libparted/labels/fdasd.c b/libparted/labels/fdasd.c
index 6d708f6..e235dd3 100644
--- a/libparted/labels/fdasd.c
+++ b/libparted/labels/fdasd.c
@@ -754,7 +754,7 @@ fdasd_check_api_version (fdasd_anchor_t *anc, int f)
{
PDEBUG
int api;
- char s[LINE_LENGTH];
+ char s[2*LINE_LENGTH];
struct stat st;
if (fstat (f, &st) == 0 && S_ISREG (st.st_mode)) {
--
1.7.5.rc3.291.g63e4e