]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mount: Enlarge buffer to fix overflow warning
authorAdam C. Emerson <aemerson@redhat.com>
Tue, 8 May 2018 20:50:02 +0000 (16:50 -0400)
committerNathan Cutler <ncutler@suse.com>
Fri, 18 May 2018 13:30:35 +0000 (15:30 +0200)
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
(cherry picked from commit 5ef603f388957b472326180a1e23ade61e80c163)

src/mount/canonicalize.c

index 7561e41ac55b11d44b7928b0b59402554b35fcd1..02efbbedff7ade22852cff71d61bb44f20c70ce0 100644 (file)
@@ -154,7 +154,7 @@ canonicalize_dm_name(const char *ptname)
 {
        FILE    *f;
        size_t  sz;
-       char    path[256], name[256], *res = NULL;
+       char    path[268], name[256], *res = NULL;
 
        snprintf(path, sizeof(path), "/sys/block/%s/dm/name", ptname);
        if (!(f = fopen(path, "r")))