OSDN Git Service

s390/dasd: avoid buffer overrun upon API mismatch diagnostic
authorBrian C. Lane <bcl@redhat.com>
Thu, 21 Apr 2011 07:36:08 +0000 (09:36 +0200)
committerJim Meyering <meyering@redhat.com>
Thu, 21 Apr 2011 07:39:15 +0000 (09:39 +0200)
* 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

index 6d708f6..e235dd3 100644 (file)
@@ -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)) {