On Fri, Jul 11, 2014 at 11:25:58AM -0700, Darrick J. Wong wrote: > The third argument is the maximum number of bytes to concatenate from the > second argument ("/start"). Though it's unlikely that we'll ever find anything > in /sys/block approaching 255 characters, we might as well guard against stack > corruption: > > if (strlen(path) > SYSFS_PATH_LEN - strlen("/start") - 1) > return 0; > strcat(path, "/start"); > > Oh, I guess coverity is complaining about this too. > > Though FWIW, "find /sys | while read f; do echo "$f" | wc -c; done | sort -g | > tail -n 5" spits out "133" as the longest sysfs path ever. I guess that could > be much longer on some multi-node NUMA box or whatever. > > <shrug> /me codes up a fix, tosses it on the patch pile. Already fixed on the maint branch. Cheers, - Ted -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html