The maximum legal length for a path name is PATH_MAX, defined in limits.h.