FreeCalypso > hg > freecalypso-sw
diff rvinterf/etmsync/fswrite.c @ 295:3dd74b16df82
fc-fsio: pathname recursion handling revamped
author | Michael Spacefalcon <msokolov@ivan.Harhan.ORG> |
---|---|
date | Sat, 01 Mar 2014 08:01:08 +0000 |
parents | 797468042b32 |
children | d1333db6385f |
line wrap: on
line diff
--- a/rvinterf/etmsync/fswrite.c Sat Mar 01 04:04:20 2014 +0000 +++ b/rvinterf/etmsync/fswrite.c Sat Mar 01 08:01:08 2014 +0000 @@ -186,6 +186,11 @@ cmd_fwrite(argc, argv) char **argv; { + if (strlen(argv[1]) >= TMFFS_STRING_SIZE) { + fprintf(stderr, + "error: pathname arg exceeds string length limit\n"); + return(ERROR_USAGE); + } if (!strcmp(argv[2], "ascii")) return do_short_fwrite(argv[1], argv[3], strlen(argv[3])); else if (!strcmp(argv[2], "hex"))