[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Cluster-devel] [PATCH 38/41] qdiskd: fix possible resource leak in scandisk



On 11/23/2011 05:15 AM, Fabio M. Di Nitto wrote:
Spotted by Coverity Scan


-	while (fgets(line, sizeof(line), fp)
-	       != NULL) {
+
+	while (fgets(line, sizeof(line) - 1, fp) != NULL) {

fgets takes at most size-1, this isn't needed

-- Lon


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]