[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <op.tht1yneaiudtyh@master>
Date: Sun, 22 Oct 2006 19:17:47 +0200
From: "Thomas Maier" <balagi@...tmail.de>
To: linux-kernel@...r.kernel.org
Cc: akpm@...l.org, gregkh@...e.de
Subject: [PATCH] 2.6.19-rc2-mm2 sysfs: sysfs_write_file() writes zero terminated data
Hello,
since most of the files in sysfs are text files,
it would be nice, if the "store" function called
during sysfs_write_file() gets a zero terminated
string / data.
The current implementation seems not to ensure this.
(But only if it is the first time the zeroed buffer
page is allocated.)
So the buffer can be scanned by sscanf() easily,
for example.
This patch simply sets a \0 char behind the
data in buffer->page.
Signed-off-by: Thomas Maier <balagi@...tmail.de>
Download attachment "sysfs_write_file-zero-term-string.patch" of type "application/octet-stream" (611 bytes)
Powered by blists - more mailing lists