]> git-server-git.apps.pok.os.sepia.ceph.com Git - jerasure.git/commitdiff
decoder: allow for path len > 100 characters
authorLoic Dachary <ldachary@redhat.com>
Mon, 15 Dec 2014 11:27:17 +0000 (12:27 +0100)
committerLoic Dachary <ldachary@redhat.com>
Mon, 15 Dec 2014 11:27:17 +0000 (12:27 +0100)
It's not that uncommon to have path longer than 100 characters.

Signed-off-by: Loic Dachary <loic@dachary.org>
Examples/decoder.c

index 0f6e030722c35c7e8fe186c731b7fc30f837827a..bd0b008fc26bbad5ed6fee69a1462cd5c048c57d 100644 (file)
@@ -138,8 +138,8 @@ int main (int argc, char **argv) {
                fprintf(stderr, "usage: inputfile\n");
                exit(0);
        }
-       curdir = (char *)malloc(sizeof(char)*100);
-       getcwd(curdir, 100);
+       curdir = (char *)malloc(sizeof(char)*1000);
+       assert(curdir == getcwd(curdir, 1000));
        
        /* Begin recreation of file names */
        cs1 = (char*)malloc(sizeof(char)*strlen(argv[1]));